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.

Original entry on oeis.org

1, 2, 3, 7, 11, 5, 13, 19, 23, 17, 31, 29, 37, 43, 47, 41, 59, 53, 67, 71, 61, 79, 83, 73, 89, 97, 103, 107, 101, 109, 127, 131, 113, 139, 137, 151, 149, 163, 167, 157, 179, 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
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Crossrefs

Programs

  • PARI
    up_to = 10000;
    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)))); };
    v348745 = A348745list(up_to);
    A348745(n) = v348745[n];