login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A137395
a(1)=1. a(n) = a(n-1) + (sum of the distinct primes that are <= n and don't divide a(n-1)).
1
1, 3, 5, 10, 13, 23, 40, 50, 60, 67, 95, 118, 157, 198, 223, 264, 306, 342, 395, 467, 544, 602, 693, 772, 870, 960, 1050, 1133, 1251, 1377, 1517, 1677, 1821, 1978, 2113, 2273, 2470, 2628, 2820, 3007, 3214, 3450, 3698, 3934, 4206, 4482, 4805, 5097, 5422, 5748
OFFSET
1,2
LINKS
EXAMPLE
The primes <= 8 are 2,3,5,7. Of these, only 3 and 7 don't divide a(7)=40. So a(8) = a(7) + 3 + 7 = 50.
MAPLE
A137395 := proc(n) option remember ; local aprev, i, a, p; if n = 1 then RETURN(1) ; fi; aprev := A137395(n-1) ; a := aprev ; for i from 1 do p := ithprime(i) ; if p > n then break; fi ; if aprev mod p <> 0 then a := a+p ; fi ; od: a ; end: seq(A137395(n), n=1..100) ; # R. J. Mathar, May 23 2008
MATHEMATICA
nxt[{n_, a_}]:=Module[{dpdd=Total[Select[Prime[Range[PrimePi[n+1]]], !Divisible[ a, #]&]]}, {n+1, a+dpdd}]; NestList[nxt, {1, 1}, 50][[All, 2]] (* Harvey P. Dale, Apr 28 2018 *)
CROSSREFS
Sequence in context: A265282 A160792 A308759 * A001767 A360956 A273160
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 10 2008
EXTENSIONS
More terms from R. J. Mathar, May 23 2008
STATUS
approved