Today it is the first day of July in the year 2017. On this day there is a point in time which can be represented as 1.7.2017, 17:17:17.

To celebrate this symbolically speaking 17-heavy day, I created a list of 17 integer sequences which all contain the number 17.

All sequences were generated using a Python program; the source code can be viewed below or downloaded. Because the following list is formatted using LaTex, the program’s plaintext output can also be downloaded.

- Prime numbers .

- Odd positive integers whose number of goldbach sums (all possible sums of two primes) of and are equal to one another.

- Positive integers who are part of a Pythagorean triple excluding : with integers .

- Positive integers where is prime

- Positive integers with distance to a perfect square.

- Positive integers where the number of perfect squares including less than is prime.

- Prime numbers where either or (exclusive) are prime.

- Positive integers whose three-dimensional vector’s floored length is prime, is prime.

- Positive integers who are the sum of a perfect square and a perfect cube (excluding ).

- Positive integers whose decimal digit sum is the cube of a prime.

- Positive integers for which is a perfect square.

- Prime numbers for which is prime.

- Positive integers where is a substring of .

- Positive integers whose decimal reverse is prime.

- Positive integers who are a decimal substring of .

- Positive integers whose binary expansion has a prime number of ‘s.

- Positive integers whose 7-segment representation uses a prime number of segments.

```
# Python 2.7.7 Code
# Jonathan Frech, 29th, 30th of June 2017
```

```
# length of sequences
N = 20
# test if n is prime
def prime(n):
for d in range(2, int(n)):
if n%d == 0: return False
return n > 1 and n%1 == 0
# n's decimal digit sum
def decimal_digitsum(n): return sum(map(int, str(n)))
# square, cube root
def sqrt(n): return n**(1/2.)
def cbrt(n): return n**(1/3.)
# floor, ceil
def floor(n): return int(n)
def ceil (n): return int(n)+(n%1 != 0)
# perfect square, cube
def issqr(n): return sqrt(n)%1 == 0
def iscub(n): return cbrt(n)%1 == 0
# count all unique ways to express n as a sum of two primes (n >= 4 has to be even)
def gold(n):
if n % 2 != 0: return 0
if n == 4: return 1
g = set()
for a in range(n):
for b in range(n):
if a+b == n and prime(a) and prime(b): g.add((min(a,b), max(a,b)))
return len(g)
# n^2=a^2+b^2 with integers a,b,n>0
def pythagorean(n):
for a in range(1, n):
for b in range(1, n):
if a**2+b**2 == n**2: return True
return False
# factorial of n; n!
def fac(n): return 1 if n <= 0 else n*fac(n-1)
# unique ways to express n as sum of two positive integers
def twosum(n):
g = set()
for a in range(1, n):
for b in range(1, n):
if a+b==n:g.add((min(a, b), max(a, b)))
return g
# number of perfect squares less than n (including 0^2)
def numsqr(n):
S = 0
for s in range(n):
if issqr(s): S += 1
return S
# positive integers who are the sum of a square and cube
def sumsqrcub(n):
for s in range(1, n):
for c in range(1, n):
if issqr(s) and iscub(c) and s+c == n: return True
# number of segments a 7-segment representation of positive integer n uses
def sevenseg(n): return sum(map(lambda x: (6, 2, 5, 5, 4, 5, 6, 3, 7, 6)[int(x)], str(n)))
# defined sequences
sequences = [
("Prime numbers n." , lambda n: prime(n)),
("Odd positive integers n whose number of goldbach sums (all possible sums of two primes) of n+1 and n-1 are equal to one another.", lambda n: 0 != gold(n-1) == gold(n+1)),
("Positive integers n who are part of a Pythagorean triple excluding 0: n^2=a^2+b^2 with integers a,b>0." , lambda n: pythagorean(n)),
("Positive integers n where floor((n!)^(1/n)) is prime" , lambda n: prime(floor(fac(n)**(1./n)))),
("Positive integers n with distance 1 to a perfect square." , lambda n: issqr(n-1) or issqr(n+1)),
("Positive integers n where the number of perfect squares including 0 less than n is prime." , lambda n: prime(numsqr(n))),
("Prime numbers n where either n-2 or n+2 (exclusive) are prime." , lambda n: prime(n) and (prime(n-2) ^ prime(n+2))),
("Positive integers n whose three-dimensional vector's (n, n, n) floored length is prime, floor(sqrt(3*n^2)) is prime." , lambda n: prime(floor(sqrt(3*n*n)))),
("Positive integers n who are the sum of a perfect square and a perfect cube (excluding 0)." , lambda n: sumsqrcub(n)),
("Positive integers n whose decimal digit sum is the cube of a prime." , lambda n: prime(cbrt(decimal_digitsum(n)))),
("Positive integers n for which decimal_digitsum(n)+n is a perfect square." , lambda n: issqr(decimal_digitsum(n)+n)),
("Prime numbers n for which decimal_digitsum(n^4) is prime." , lambda n: prime(n) and prime(decimal_digitsum(n**4))),
("Positive integers n where decimal_digitsum(2*n) is a substring of n." , lambda n: str(decimal_digitsum(2*n)) in str(n)),
("Positive integers n whose decimal reverse is prime." , lambda n: prime(int(str(n)[::-1]))),
("Positive integers n who are a decimal substring of n^n." , lambda n: str(n) in str(n**n)),
("Positive integers n whose binary expansion has a prime number of 1's." , lambda n: prime(bin(n).count("1"))),
("Positive integers n whose 7-segment representation uses a prime number of segments." , lambda n: prime(sevenseg(n))),
# The following three sequences are not interesting enough to be featured.
#("Positive integers n where the number of unique sums of two positive integers which equal n equals decimal_digitsum(n)." , lambda n: len(twosum(n)) == decimal_digitsum(n)),
#("Positive integers n which are not divisible by their decimal digit sum." , lambda n: n%decimal_digitsum(n) != 0),
#("Positive integers n whose octal representation is a substring of the octal representation of (n^2)!." , lambda n: oct(n)[1:] in oct(fac(n*n))[1:]),
()][:-1]
# calculate sequence with given filtering function
def getseq(ftr):
seq, n = [], 1
while len(seq) < N:
if ftr(n): seq.append(n)
n += 1
return str(seq)[1:-1]
# print sequences
for s in range(len(sequences)): print "(%02d) %s\n {%s, ...}\n" % (s+1, sequences[s][0], getseq(sequences[s][1]))
```