Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Mar 13 2023 11:50:08
%S 2,2,3,3,3,5,5,5,5,5,7,7,7,7,7,7,7,11,11,11,11,11,11,11,11,11,11,11,
%T 13,13,13,13,13,13,13,13,13,13,13,13,13,17,17,17,17,17,17,17,17,17,17,
%U 17,17,17,17,17,17,17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19
%N Each prime p appears p times.
%C a(A007504(k)) = prime(k) and a(A007504(k) + 1) = prime(k + 1) for k > 0, where prime = A000040.
%H Harry J. Smith, <a href="/A063905/b063905.txt">Table of n, a(n) for n=1,...,1000</a>
%e a(A007504(4)) = prime(4) = 7 = a(17) and a(18) = a(A007504(4)+1) = prime(4+1) = prime(5) = 11.
%t Flatten[Table[Prime[n], {n, 8}, {Prime[n]}]] (* _Alonso del Arte_, Sep 08 2011 based on _Robert G. Wilson v_'s program for A002024 *)
%t Table[PadRight[{},p,p],{p,Prime[Range[8]]}]//Flatten (* _Harvey P. Dale_, Mar 13 2023 *)
%o (PARI) { n=0; p=1; for (m=1, 10^9, p=nextprime(p+1); for (i=1, p, write("b063905.txt", n++, " ", p); if (n==1000, break)); if (n==1000, break) ) } \\ _Harry J. Smith_, Sep 02 2009
%o (Haskell)
%o a063905 n = a063905_list !! (n-1)
%o a063905_list =
%o concat $ zipWith ($) (map replicate a000040_list) a000040_list
%o -- _Reinhard Zumkeller_, Mar 18 2011
%Y Cf. A007504, A002024, A000040, A175944.
%K nonn,easy
%O 1,1
%A _Reinhard Zumkeller_, Aug 30 2001