Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #32 Dec 16 2024 07:44:28
%S 10,1011,1011101,1011101111,10111011111011,101110111110111101,
%T 10111011111011110110001,1011101111101111011000110011,
%U 101110111110111101100011001110111,10111011111011110110001100111011111101,1011101111101111011000110011101111110111111
%N Concatenation of the first n primes written in base 2.
%C Number of bits in a(n) = Sum_{i=1..n} A035100(i). See A328659(n).
%H Seiichi Manyama, <a href="/A154703/b154703.txt">Table of n, a(n) for n = 1..122</a>
%F a(n) = CONCATENATE[i=1..n] A004676(i) = CONCATENATE[i=1..n] A007088(A000040(i)).
%e a(2) = 1011 = 10 Concat 11 = (2 base 2) Concat (3 base 2).
%p A154703 := proc(n) option remember: local d: if(n=1)then return 10: fi: d:=convert(ithprime(n),base,2): return parse(cat(convert(procname(n-1),string), convert(op(convert(d,base,10,10^nops(d))),string))): end: seq(A154703(n),n=1..10); # _Nathaniel Johnston_, May 27 2011
%p # second Maple program:
%p a:= proc(n) option remember; `if`(n=0, 0,
%p parse(cat(a(n-1), convert(ithprime(n), binary))))
%p end:
%p seq(a(n), n=1..12); # _Alois P. Heinz_, Dec 16 2024
%t With[{p = IntegerDigits[Prime[Range[15]], 2]}, Array[FromDigits[Flatten[p[[;;#]]]] &, Length[p]]] (* _Paolo Xausa_, Feb 26 2024 *)
%o (PARI) a(n) = fromdigits(concat(apply(binary, primes(n)))); \\ _Michel Marcus_, Jul 17 2023
%Y Cf. A000040, A004676, A007088, A035100, A328659.
%K base,easy,nonn
%O 1,1
%A _Jonathan Vos Post_, Jan 14 2009
%E Corrected terms a(6) and beyond from _Seiichi Manyama_, Jul 17 2023