OFFSET
1,1
COMMENTS
Partial sums of primes in which neighboring digits differ at most by 1 (neighbors of 9 are 0 and 8 and 9). The subsequence of primes in this partial sum begins: 5, 17, 2003, 3467, 5231, 7349, 101141, 187367. What is the smallest value in this partial sum (after 5) which is itself a prime in which neighboring digits differ at most by 1? What is the analog in other bases?
FORMULA
a(n) = SUM[i=1..n] A068148(i).
EXAMPLE
a(16) = 2 + 3 + 5 + 7 + 11 + 23 + 43 + 67 + 89 + 101 + 109 + 211 + 223 + 233 + 433 + 443 = 2003 is prime.
MATHEMATICA
Accumulate[Select[Prime[Range[1500]], Max[Abs[Differences[ IntegerDigits[ #]]] /.{9->1}] <2&]] (* Harvey P. Dale, Apr 01 2019 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, May 20 2010
STATUS
approved