login
1 appears once, n-th prime p appears p times.
8

%I #35 May 16 2019 18:22:32

%S 1,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

%N 1 appears once, n-th prime p appears p times.

%C a(A014284(n)) = a(A175965(n)) = A018252(n). [_Reinhard Zumkeller_, Mar 18 2011]

%C This is how A063905 would have been reckoned at the beginning of the 20th century, taking the primes as given in A008578 instead of the way they are given in A000040. [_Alonso del Arte_, Sep 09 2011]

%F a(1)=1, a(n)=A063905(n-1) for n>1.

%t Join[{1}, 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 Join[{1},Flatten[Table[PadRight[{},n,n],{n,Prime[Range[10]]}]]] (* _Harvey P. Dale_, May 16 2019 *)

%o (Haskell)

%o a175944 n = a175944_list !! (n-1)

%o a175944_list =

%o concat $ zipWith ($) (map replicate a018252_list) a018252_list

%o -- _Reinhard Zumkeller_, Mar 18 2011

%Y Cf. A063905.

%Y Cf. A005145.

%K nonn,easy

%O 1,2

%A _Juri-Stepan Gerasimov_, Oct 27 2010