login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 02:28 EDT 2024. Contains 371917 sequences. (Running on oeis4.)