login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077345 a(n) is the n-th prime whose decimal expansion begins with the decimal expansion of n. 4

%I #15 Oct 25 2021 08:08:04

%S 11,23,37,401,509,617,719,829,953,1033,1171,1279,1373,1483,15013,1697,

%T 17021,18049,19001,20051,21067,22031,23027,24097,25127,26107,27103,

%U 28123,29153,30161,31159,32189,33161,34259,35171,36241,37243,38299,39241,40237,41263

%N a(n) is the n-th prime whose decimal expansion begins with the decimal expansion of n.

%C Original name was: Final terms of rows in A077344.

%C Subsidiary sequence: There can be a rearrangement of primes in groups so that the n-th group contains n primes beginning with n and not occurring earlier. E.g. the initial term of row 11 would be 113 and not 11.

%H Alois P. Heinz, <a href="/A077345/b077345.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Pri#piden">Index entries for primes involving decimal expansion of n</a>

%p u:= (h, t)-> select(isprime, [seq(h*10^t+k, k=0..10^t-1)]):

%p A:= proc(n, k) local l, p;

%p l:= proc() [] end; p:= proc() -1 end;

%p while nops(l(k))<n do p(k):= p(k)+1;

%p l(k):= [l(k)[], u(k, p(k))[]]

%p od: l(k)[n]

%p end:

%p a:= n-> A(n$2):

%p seq(a(n), n=1..45); # _Alois P. Heinz_, Sep 30 2015

%t u[h_, t_] := Select[Table[h*10^t + k, {k, 0, 10^t - 1}], PrimeQ];

%t A[n_, k_] := Module[{l, p}, l[_] = {}; p[_] = -1; While[Length[l[k]] < n, p[k] = p[k] + 1; l[k] = Join[l[k], u[k, p[k]]]]; l[k][[n]]];

%t a[n_] := A[n, n];

%t Table[a[n], {n, 1, 45}] (* _Jean-François Alcover_, Oct 25 2021, after _Alois P. Heinz_ *)

%Y Cf. A077344.

%Y Main diagonal of A262369.

%K base,easy,nonn

%O 1,1

%A _Amarnath Murthy_, Nov 05 2002

%E More terms and new name from _Alois P. Heinz_, Sep 30 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 11 20:49 EDT 2024. Contains 374234 sequences. (Running on oeis4.)