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.

Previous Showing 11-18 of 18 results.

A332894 a(1) = 0, a(2n) = 1 + a(n), a(2n+1) = 1 + a(A332819(2n+1)); also binary width of terms of A332816.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 3, 4, 6, 4, 5, 5, 4, 4, 7, 4, 8, 5, 5, 7, 10, 5, 4, 6, 4, 6, 9, 5, 12, 5, 7, 8, 5, 5, 11, 9, 6, 6, 13, 6, 14, 8, 5, 11, 16, 6, 5, 5, 8, 7, 15, 5, 7, 7, 9, 10, 18, 6, 17, 13, 6, 6, 6, 8, 20, 9, 11, 6, 22, 6, 19, 12, 5, 10, 7, 7, 24, 7, 5, 14, 26, 7, 8, 15, 10, 9, 21, 6, 6, 12, 13, 17, 9, 7, 23, 6, 8, 6, 25, 9, 28, 8, 6
Offset: 1

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

a(n) tells how many iterations of A332893 are needed before 1 is reached, i.e., the distance of n from 1 in binary trees like A332815.
Each n > 0 occurs 2^(n-1) times in total.

Crossrefs

Programs

Formula

a(n) = A252464(A332808(n)).
a(1) = 0, and for n > 1, a(n) = 1 + a(A332893(n)).
For n >= 1, a(A108546(n)) = n; for all n >= 0, a(2^n) = n.
For n > 1: (Start)
a(n) = 1 + a(n/2) if n is even, and a(n) = 1 + a(A332819(n)), if n is odd.
a(n) = A070939(A332816(n)).
a(n) >= A332899(n).
(End)

A332895 a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A332893(n)) + [n == 1 (mod 4)].

Original entry on oeis.org

0, 1, 2, 2, 5, 4, 10, 4, 5, 10, 42, 8, 21, 20, 8, 8, 85, 10, 170, 20, 21, 84, 682, 16, 11, 42, 8, 40, 341, 16, 2730, 16, 85, 170, 16, 20, 1365, 340, 40, 40, 5461, 42, 10922, 168, 17, 1364, 43690, 32, 23, 22, 168, 84, 21845, 16, 80, 80, 341, 682, 174762, 32, 87381, 5460, 40, 32, 43, 170, 699050, 340, 1365, 32, 2796202
Offset: 1

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Crossrefs

Programs

Formula

a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A332893(n)) + [n == 1 (mod 4)].
For n > 1, a(2n) = 2*a(n).
For n >= 1, a(A108546(n)) = A000975(n); A000120(a(n)) = A332897(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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Comments

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.

Crossrefs

Programs

  • PARI
    up_to = 10000;
    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); };
    v348744 = A348744list(up_to);
    A348744(n) = v348744[n];

Formula

a(n) = A348746(A000040(n)).

A111745 a(2k-1) = k-th prime congruent to 3 mod 4, a(2k) = k-th prime congruent to 1 mod 4.

Original entry on oeis.org

3, 5, 7, 13, 11, 17, 19, 29, 23, 37, 31, 41, 43, 53, 47, 61, 59, 73, 67, 89, 71, 97, 79, 101, 83, 109, 103, 113, 107, 137, 127, 149, 131, 157, 139, 173, 151, 181, 163, 193, 167, 197, 179, 229, 191, 233, 199, 241, 211, 257, 223, 269, 227, 277, 239, 281, 251, 293, 263
Offset: 1

Views

Author

Jon Perry, Nov 19 2005

Keywords

Comments

The graph shows the "race" between the two types of primes. - T. D. Noe, Nov 15 2006

Crossrefs

Cf. bisections A002144, A002145.

Programs

  • Mathematica
    Module[{prs=Prime[Range[70]],m3,m1,min},m3=Select[prs,Mod[#,4]==3&];m1=Select[prs,Mod[#,4]==1&];min=Min[Length[m1],Length[m3]];Riffle[ Take[m3,min],Take[m1,min]]] (* Harvey P. Dale, Apr 15 2012 *)

Formula

a(n)=A108546(n+1). [From R. J. Mathar, Aug 15 2008]

Extensions

Edited, corrected and extended by Franklin T. Adams-Watters, Jul 19 2006
Corrected by T. D. Noe, Nov 15 2006

A108549 Fixed points for A108548.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 27, 28, 30, 32, 34, 35, 36, 38, 40, 41, 42, 43, 45, 48, 49, 50, 51, 54, 56, 57, 60, 63, 64, 68, 70, 72, 75, 76, 80, 81, 82, 84, 85, 86, 90, 95, 96, 98, 100, 102, 105, 108, 112, 114, 119, 120, 123, 125
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2005

Keywords

Comments

A108548(a(n)) = a(n); multiplicative closure of A108547.

Crossrefs

Cf. A108546.

A332805 a(n) = A000720(A332806(n)).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 10, 9, 12, 11, 13, 14, 16, 15, 18, 17, 20, 22, 19, 24, 26, 21, 23, 25, 28, 30, 27, 29, 32, 34, 31, 36, 33, 38, 35, 40, 42, 37, 44, 39, 46, 41, 43, 48, 50, 52, 54, 45, 47, 56, 49, 58, 51, 60, 53, 62, 55, 57, 64, 59, 66, 68, 61, 63, 70, 65, 72, 67, 69, 74, 76, 71, 78, 80, 73, 75, 77, 79, 82, 81, 84, 83, 86, 88, 85
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2020

Keywords

Crossrefs

Cf. A000040, A108546, A332806, A332807 (inverse permutation).
Fixed points are given by A000720(A108547(n)), n>=1.
Cf. also A267100.

Programs

  • PARI
    up_to = 10000;
    A332805list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p,q); v[2] = 3; v[1] = 5; mapput(xs,1,1); mapput(xs,2,2); mapput(xs,3,3);  for(n=4,up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs,primepi(q),n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, u))); };
    v332805 = A332805list(up_to);
    A332805(n) = v332805[n];

Formula

For all n >= 1, A108546(a(n)) = A000040(n).

A102261 a(n) = A002144(n) - A002145(n).

Original entry on oeis.org

2, 6, 6, 10, 14, 10, 10, 14, 14, 22, 26, 22, 26, 10, 30, 22, 26, 34, 30, 30, 30, 50, 42, 42, 46, 46, 50, 42, 42, 50, 46, 54, 42, 42, 42, 42, 38, 34, 30, 38, 14, 18, 18, 18, 46, 54, 62, 70, 78, 78, 90, 78, 66, 54, 70, 66, 62, 66, 58, 70, 66, 86, 98, 78, 78, 54, 70, 70, 78, 78
Offset: 1

Views

Author

Paul Curtz, Sep 06 2008

Keywords

Comments

a(n) = A108546(2*n+1) - A108546(2*n).

Programs

  • Maple
    A002144 := proc(n) option remember ; if n = 1 then RETURN(5) ; fi; for a from procname(n-1)+2 do if isprime(a) and (a mod 4 = 1 ) then RETURN(a) ; fi; od: end; A002145 := proc(n) option remember ; if n = 1 then RETURN(3) ; fi; for a from procname(n-1)+2 do if isprime(a) and (a mod 4 = 3 ) then RETURN(a) ; fi; od: end; A102261 := proc(n) A002144(n)-A002145(n) ; end: seq(A102261(n),n=1..120) ; # R. J. Mathar, Feb 07 2009
  • Mathematica
    nmax = 70; a1 = Select[Range[1, Prime[3*nmax], 4], PrimeQ]; a3 = Select[Range[3, Prime[3*nmax], 4], PrimeQ]; a[n_] := a1[[n]] - a3[[n]]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Dec 17 2013 *)

Extensions

Edited by N. J. A. Sloane, Sep 06 2008
More terms from R. J. Mathar, Feb 07 2009

A339900 Lexicographically earliest permutation of odd primes such that A007814(a(n)-1) = 1+A007814(n), where A007814 gives the 2-adic valuation of n.

Original entry on oeis.org

3, 5, 7, 41, 11, 13, 19, 17, 23, 29, 31, 73, 43, 37, 47, 97, 59, 53, 67, 89, 71, 61, 79, 113, 83, 101, 103, 137, 107, 109, 127, 193, 131, 149, 139, 233, 151, 157, 163, 241, 167, 173, 179, 281, 191, 181, 199, 353, 211, 197, 223, 313, 227, 229, 239, 337, 251, 269, 263, 409, 271, 277, 283, 641, 307, 293, 311, 457, 331
Offset: 1

Views

Author

Antti Karttunen, Dec 25 2020

Keywords

Crossrefs

Cf. A002145 (odd bisection), A007521 (quadrisection starting from 5), A105126, A105127, A105128, A105129, A105130, A105131, A105132.
Cf. also A108546, A111745.

Programs

  • PARI
    A339900(n) = { my(lev=1+valuation(n,2), k=(1+(n>>(lev-1)))/2); forprime(p=3,,if(valuation(p-1,2)==lev, k--; if(!k, return(p)))); };
Previous Showing 11-18 of 18 results.