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.

A348745 Bijection from primes to {1} U primes, a left inverse of A348744.

This page as a plain text file.
%I A348745 #4 Nov 02 2021 20:59:36
%S A348745 1,2,3,7,11,5,13,19,23,17,31,29,37,43,47,41,59,53,67,71,61,79,83,73,
%T A348745 89,97,103,107,101,109,127,131,113,139,137,151,149,163,167,157,179,
%U A348745 173,191,181,193,199,211,223,227,197,229,239,233,251,241,263,257,271,269,277,283,281,307,311,293,313,331,317,347,337
%N A348745 Bijection from primes to {1} U primes, a left inverse of A348744.
%o A348745 (PARI)
%o A348745 up_to = 10000;
%o A348745 A348745list(up_to) = { my(lista=List([]), xs=Map(), i=2, p, q, u); mapput(xs,3,1); for(n=2,up_to, p = prime(n); if(1==(p%4), for(k=1+n,oo,q=prime(k);if((1==(q%4))&&!mapisdefined(xs,q),break)), while(mapisdefined(xs,prime(i)), i++); q = prime(i)); mapput(xs,q,n)); listput(lista,1); for(i=2,oo,if(!mapisdefined(xs,prime(i),&u),return(Vec(lista)),listput(lista,prime(u)))); };
%o A348745 v348745 = A348745list(up_to);
%o A348745 A348745(n) = v348745[n];
%Y A348745 Cf. A002144, A002145, A348744, A348747.
%K A348745 nonn
%O A348745 1,2
%A A348745 _Antti Karttunen_, Nov 02 2021