cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A138840 Concatenation of initial and final digits of n-th prime.

This page as a plain text file.
%I A138840 #41 Nov 23 2023 19:49:37
%S A138840 22,33,55,77,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,
%T A138840 89,97,11,13,17,19,13,17,11,17,19,19,11,17,13,17,13,19,11,11,13,17,19,
%U A138840 21,23,27,29,23,29,21,21,27,23,29,21,27,21,23,23,37,31,33,37,31,37,37
%N A138840 Concatenation of initial and final digits of n-th prime.
%C A138840 There are only 38 distinct terms in this sequence, all of them odd with the exception of 22. 55 is the only term divisible by 5. 22 and 55 each appear only once. The other terms, each of which appears multiple times, are the odd two-digit numbers not divisible by 5. - _Harvey P. Dale_, May 15 2012
%C A138840 a(n) is the concatenation of A077648(n) and A007652(n), hence all terms of this sequence have two digits in the same way as A073729. - _Omar E. Pol_, Mar 23 2018
%H A138840 Harvey P. Dale, <a href="/A138840/b138840.txt">Table of n, a(n) for n = 1..1000</a>
%H A138840 Omar E. Pol, <a href="http://www.polprimos.com">Determinacion geometrica de los numeros primos y perfectos</a>.
%p A138840 a:= n-> (p-> parse(cat(p[1], p[-1])))(""||(ithprime(n))):
%p A138840 seq(a(n), n=1..92);  # _Alois P. Heinz_, Nov 23 2023
%t A138840 cifd[n_]:=Module[{il=IntegerLength[n],idn=IntegerDigits[n]},Which[ il==1, 10n+n, il==2,n,il>2,FromDigits[Join[{First[idn],Last[idn]}]]]]; cifd/@ Prime[ Range[70]] (* _Harvey P. Dale_, May 15 2012 *)
%o A138840 (PARI) a(n) = my(d=digits(prime(n))); fromdigits(concat(d[1], d[#d])); \\ _Michel Marcus_, Mar 23 2018
%Y A138840 Cf. A000040, A007652, A073729, A077648, A138841, A138842, A138843, A138844.
%Y A138840 Cf. A137589 (same except for first four terms).
%K A138840 base,easy,nonn,look
%O A138840 1,1
%A A138840 _Omar E. Pol_, Apr 01 2008