A338846 No nonprime digit is present in a(n) + a(n+1).
0, 2, 1, 4, 3, 19, 6, 16, 7, 15, 8, 14, 9, 13, 10, 12, 11, 21, 31, 22, 5, 17, 18, 34, 23, 29, 24, 28, 25, 27, 26, 46, 176, 47, 30, 42, 33, 20, 32, 40, 35, 37, 36, 39, 38, 184, 41, 181, 44, 178, 45, 177, 48, 174, 49, 173, 50, 172, 51, 171, 52, 170, 53, 169, 54, 168, 55, 167, 56, 166, 57, 165, 58, 164, 59
Offset: 1
Examples
a(1) + a(2) = 0 + 2 = 2 (no nonprime digit is present); a(2) + a(3) = 2 + 1 = 3 (no nonprime digit is present); a(3) + a(4) = 1 + 4 = 5 (no nonprime digit is present); a(4) + a(5) = 4 + 3 = 7 (no nonprime digit is present); a(5) + a(6) = 3 + 19 = 22 (no nonprime digit is present); etc.
Links
Crossrefs
Programs
-
Maple
N:= 1000: # for terms before the first term > N S:= [$1...N]: V:=Vector(N): for n from 2 to N do for i from 1 to N+2-n do s:= S[i]; if convert(convert(V[n-1]+s,base,10),set) subset {2,3,5,7} then V[n]:= s; S:= subsop(i=NULL,S); break fi; od; if V[n] = 0 then break fi od: convert(V[1..n-1],list); # Robert Israel, Nov 18 2020
-
Mathematica
Block[{a = {0}}, Do[Block[{k = 1}, While[Nand[FreeQ[a, k], NoneTrue[IntegerDigits@ Total[a[[-1]] + k], ! PrimeQ@ # &]], k++]; AppendTo[a, k]], {i, 2, 75}]; a] (* Michael De Vlieger, Nov 12 2020 *)
Comments