|
|
A064924
|
|
If n is prime then a(n) = n; for the subsequent nonprime positions a(n + k) = (k+1)*n; then at the next prime position a new subsequence begins.
|
|
4
|
|
|
2, 3, 6, 5, 10, 7, 14, 21, 28, 11, 22, 13, 26, 39, 52, 17, 34, 19, 38, 57, 76, 23, 46, 69, 92, 115, 138, 29, 58, 31, 62, 93, 124, 155, 186, 37, 74, 111, 148, 41, 82, 43, 86, 129, 172, 47, 94, 141, 188, 235, 282, 53, 106, 159, 212, 265, 318, 59, 118, 61, 122, 183, 244
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
|
|
MATHEMATICA
|
a[n_?PrimeQ] := n; a[n_] := NextPrime[n, -1]*(n - NextPrime[n, -1] + 1); Table[a[n], {n, 2, 64}] (* Jean-François Alcover, Sep 19 2011 *)
Flatten[First[#]Range[Last[#]-First[#]]&/@Partition[Prime[Range[20]], 2, 1]] (* Harvey P. Dale, May 03 2012 *)
|
|
PROG
|
(PARI) { for (n=2, 10000, if (isprime(n), a=m=n; k=2, a=k*m; k++); write("b064924.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 29 2009
(Haskell)
import Data.List (genericTake)
a064924 n = a064924_list !! (n-1)
a064924_list = concat $ zipWith (\p g -> genericTake g [p, 2 * p ..])
a000040_list $ zipWith (-) (tail a000040_list) a000040_list
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|