%I #39 Dec 30 2023 02:22:13
%S 1,21,213,4213,42135,642135,6421357,86421357,864213579,10864213579,
%T 1086421357911,121086421357911,12108642135791113,1412108642135791113,
%U 141210864213579111315,16141210864213579111315,1614121086421357911131517,181614121086421357911131517,18161412108642135791113151719
%N Pendulum numbers: alternately append n to beginning or end of previous term.
%C Comments from _N. J. A. Sloane_, Dec 07 2019: (Start)
%C _Eric Angelini_ and Kay Rosen suggest these could be called Pnuumlde numbers.
%C _Eric Angelini_ asks if any term is a prime.
%C _James R. Buddenhagen_ finds that the first prime is a(121), a 255-digit prime according to Maple.
%C _Hans Havermann_ finds that there is one more prime in the first 10000 terms, a(1399), which is a 4489-digit prime.
%C (End)
%C The third prime in the sequence is a(40714) with 192464 decimal digits. The terms at even indices are duplicated by the even-indexed terms of A281254, which is why this term is a prime for both sequences. - _Hans Havermann_, Jan 16 2020
%H Harvey P. Dale, <a href="/A053063/b053063.txt">Table of n, a(n) for n = 1..369</a>
%H Felice Russo, <a href="http://doi.org/10.5281/zenodo.8795">A set of new Smarandache functions, sequences and conjectures in number theory</a>, American Research Press 2000.
%t nxt[{n_,a_}]:={n+1,If[OddQ[n],(n+1)*10^IntegerLength[a]+a,a*10^IntegerLength[ n+1]+ n+1]}; NestList[nxt,{1,1},30][[All,2]] (* _Harvey P. Dale_, Jul 20 2022 *)
%o (PARI) lista(nn) = {print1(val=1, ", "); b = 0; for (n=2, nn, if (b, val = concat(Str(val), Str(n)), val = concat(Str(n), Str(val))); print1(val, ", "); b = 1 - b;);} \\ _Michel Marcus_, Aug 11 2017
%Y See A281254 for another version.
%K easy,nonn,base
%O 1,2
%A _Felice Russo_, Feb 25 2000
%E More terms from _Michel Marcus_, Aug 11 2017
|