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.

A348744 Lexicographically earliest bijection from primes to odd primes where each prime of the form 4k+1 is mapped to the next larger prime that is of the same form.

This page as a plain text file.
%I A348744 #8 Nov 02 2021 20:59:30
%S A348744 3,5,13,7,11,17,29,19,23,37,31,41,53,43,47,61,59,73,67,71,89,79,83,97,
%T A348744 101,109,103,107,113,137,127,131,149,139,157,151,173,163,167,181,179,
%U A348744 193,191,197,229,199,211,223,227,233,241,239,257,251,269,263,277,271,281,293,283,313,307,311,317,337,331,349,347
%N A348744 Lexicographically earliest bijection from primes to odd primes where each prime of the form 4k+1 is mapped to the next larger prime that is of the same form.
%C A348744 Terms of A002144 map each to the next term there, as: 5 -> 13 -> 17 -> 29 -> 37 -> 41, etc., and the remaining positions are filled with the terms of A002145: 3, 7, 11, 19, 23, 31, 43, etc., which gives the result that 2 is mapped to 3, 3 is mapped 5, and the rest of 4k+3 primes are fixed.
%F A348744 a(n) = A348746(A000040(n)).
%o A348744 (PARI)
%o A348744 up_to = 10000;
%o A348744 A348744list(up_to) = { my(v=vector(up_to), xs=Map(), i=2, p, q); mapput(xs,v[1]=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),v[n]=q;break)), while(mapisdefined(xs,prime(i)), i++); v[n] = prime(i)); mapput(xs,v[n],n)); (v); };
%o A348744 v348744 = A348744list(up_to);
%o A348744 A348744(n) = v348744[n];
%Y A348744 Cf. A000040, A002144, A002145, A348745, A348746.
%Y A348744 Cf. also A108546, A332211.
%K A348744 nonn
%O A348744 1,1
%A A348744 _Antti Karttunen_, Nov 02 2021