| 1, 3, 6, 8, 13, 16, 23, 27, 30, 35, 46, 52, 65, 72, 77, 85, 102, 111, 130, 140, 147, 158, 181, 193, 198, 211, 220, 234, 263, 278, 309, 325, 336, 353, 360, 378, 415, 434, 447, 467, 508, 529, 572, 594, 609, 632, 679, 703, 710, 735, 752, 778, 831, 858, 869, 897 (list; graph; refs; listen; history; edit; text; internal format) |
|
| OFFSET | 1,2 | | COMMENTS | | | LINKS | | | FORMULA | | | EXAMPLE | a(2) = 3 since 2 is prime, therefore a(1) + 2 = 3. a(3) = 6 since 3 is prime, therefore a(2) + 3 = 6. a(4) = 8 since 4 is not prime, therefore a(3) + 4/lpf(4) = 6 + 2 = 8. a(5) = 13 since 5 is prime, therefore a(4) + 5 = 13. a(6) = 16 since 6 is not prime, hence a(5) + 6/lpf(6) = 13 + 3 = 16, etc. (End) | | MATHEMATICA | a[1]=1; a[n_]:=If[PrimeQ[n], a[n-1]+n, a[n-1]+Divisors[n][[-2]]]; Table[a[n], {n, 56}] | | CROSSREFS | | | KEYWORD | nonn,easy,new | | AUTHOR | | | STATUS | approved |
|
No comments:
Post a Comment