login
A163963
First differences of A080735.
13
1, 2, 1, 5, 1, 11, 1, 23, 1, 47, 1, 1, 1, 97, 1, 1, 1, 197, 1, 1, 1, 397, 1, 1, 1, 797, 1, 1, 1, 1597, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3203, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6421, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12853, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25717, 1, 1, 1, 51437, 1, 1, 1
OFFSET
1,2
COMMENTS
Ignoring the 1 terms we obtain A055496. If we consider sequences A_i={a_i(n)}, i=1,2,... with the same constructions as A080735, but with initials a_1(1)=2, a_2(1)=3, a_3(1)=13,..., a_m(1)=A080359(m),..., then the union of A_1,A_2,... contains all primes.
LINKS
MAPLE
A080735 := proc(n) option remember; local p ; if n = 1 then 1; else p := procname(n-1) ; if isprime(p) then 2*p; else p+1 ; end if; end if; end proc: A163963 := proc(n) A080735(n+1)-A080735(n) ; end: seq(A163963(n), n=1..100) ; # R. J. Mathar, Nov 05 2009
MATHEMATICA
Differences@ NestList[If[PrimeQ@ #, 2 #, # + 1] &, 1, 87] (* Michael De Vlieger, Dec 06 2018, after Harvey P. Dale at A080735 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = if (isprime(va[n-1]), 2*va[n-1], va[n-1]+1); ); vector(nn-1, n, va[n+1] - va[n]); } \\ Michel Marcus, Dec 06 2018
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Aug 07 2009
EXTENSIONS
More terms from R. J. Mathar, Nov 05 2009
STATUS
approved