OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10237 (as an irregular triangle, rows 1 <= n <= 36, flattened)
Michael De Vlieger, Log-log scatterplot of a(n) for 1 <= n <= 11636, showing 36 rows if read as an irregular table.
EXAMPLE
Table showing a(n) for the first rows m of this sequence seen as an irregular triangle T(m,j). "New" numbers introduced for prime (n+1) are shown in parentheses:
m\j 1 2 3 4 5 6 7 8 9 10 11 A338237(m)
------------------------------------------------------------
1: (1) 1
2: (2) 1 2
3: (3) 2 (4) 1 4
4: 3 2 (5) 4 (6) 1 6
5: 3 2 (7) 5 (8) 4 6 1 8
6: (9) 3 2 7 5 8 (10) 4 (11) 6 1 11
... (End)
MATHEMATICA
c = 0; 1 + Reap[Do[Set[a[i], If[PrimeQ[i], i; c++, a[i - c]] ]; Sow[a[i]], {i, 2, 2^24}] ][[-1, -1]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Nov 09 2021
STATUS
approved