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.

Showing 1-10 of 63 results. Next

A014662 Primes p such that order of 2 mod p (=A007733(p)) is even.

Original entry on oeis.org

3, 5, 11, 13, 17, 19, 29, 37, 41, 43, 53, 59, 61, 67, 83, 97, 101, 107, 109, 113, 131, 137, 139, 149, 157, 163, 173, 179, 181, 193, 197, 211, 227, 229, 241, 251, 257, 269, 277, 281, 283, 293, 307, 313, 317, 331, 347, 349, 353, 373, 379, 389, 397, 401, 409, 419
Offset: 1

Views

Author

Keywords

Comments

Apart from the first term, identical to A091317. - Charles R Greathouse IV, Feb 13 2009
Dirichlet density is 5/24 (Fein, Gordon, & Smith); they show a result on expressing -1 as the sum of two squares relating to this sequence. - Charles R Greathouse IV, May 15 2024

References

  • P. Moree, Appendix to V. Pless et al., Cyclic Self-Dual Z_4 Codes, Finite Fields Applic., vol. 3 pp. 48-69, 1997.

Crossrefs

The prime terms of A296243.
Cf. A091317.

Programs

  • Magma
    [ p: p in PrimesInInterval(3, 419) | IsEven(Modorder(2, p)) ]; // Klaus Brockhaus, Dec 09 2008
    
  • Maple
    select(t -> isprime(t) and numtheory:-order(2,t)::even, [2*i+1 $ i=1..1000]); # Robert Israel, Aug 12 2014
  • Mathematica
    Select[Prime[Range[80]], EvenQ[MultiplicativeOrder[2, #/(2^IntegerExponent[ #, 2])]]&] (* Jean-François Alcover, Sep 02 2018 *)
  • PARI
    isok(p) = isprime(p) && !(znorder(Mod(2, p/2^valuation(p, 2))) % 2); \\ Michel Marcus, Sep 02 2018
    
  • PARI
    is(n)=n>2 && Mod(2,n)^(n>>valuation(n-1,2))!=1 && isprime(n) \\ Charles R Greathouse IV, May 07 2024

Extensions

More terms from Klaus Brockhaus, Dec 09 2008

A286573 Compound filter: a(n) = P(A007733(n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 5, 7, 14, 23, 9, 29, 42, 40, 65, 80, 90, 31, 40, 121, 44, 142, 189, 109, 61, 115, 77, 302, 273, 148, 318, 94, 434, 532, 20, 497, 115, 86, 148, 826, 702, 271, 148, 355, 230, 601, 119, 220, 265, 131, 299, 1178, 297, 485, 86, 265, 1430, 838, 320, 328, 271, 556, 1769, 1957, 1890, 50, 142, 2017, 148, 751, 2277, 179, 373, 832, 665, 2932, 54, 856, 485
Offset: 1

Views

Author

Antti Karttunen, May 26 2017

Keywords

Crossrefs

Programs

  • PARI
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ This function from Michel Marcus, Apr 11 2015
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286573(n) = (1/2)*(2 + ((A007733(n)+A046523(n))^2) - A007733(n) - 3*A046523(n));
    
  • Python
    from sympy import divisors, factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a002326(n):
        m=1
        while True:
            if (2**m - 1)%(2*n + 1)==0: return m
            else: m+=1
    def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
    def a007733(n): return a002326((a000265(n) - 1)/2)
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(a007733(n), a046523(n)) # Indranil Ghosh, May 26 2017

Formula

a(n) = (1/2)*(2 + ((A007733(n)+A046523(n))^2) - A007733(n) - 3*A046523(n)).

A256757 Number of iterations of A007733 required to reach 1.

Original entry on oeis.org

0, 1, 2, 1, 2, 2, 3, 1, 3, 2, 3, 2, 3, 3, 2, 1, 2, 3, 4, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 2, 3, 1, 3, 2, 3, 3, 4, 4, 3, 2, 3, 3, 4, 3, 3, 4, 5, 2, 4, 3, 2, 3, 4, 4, 3, 3, 4, 4, 5, 2, 3, 3, 3, 1, 3, 3, 4, 2, 4, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 2, 5, 3, 4, 3, 2, 4, 4, 3, 4, 3, 3, 4, 3, 5, 4, 2, 3, 4, 3, 3
Offset: 1

Views

Author

Ivan Neretin, Apr 09 2015

Keywords

Comments

In other words, the minimal height (not counting k) of the power tower 2^(2^(...^(2^k)...)) required to make it eventually constant modulo n (=A245970(n)) for sufficiently large k.
a(n) <= A227944(n) + 1. - Max Alekseyev, Oct 11 2016

Crossrefs

Cf. A007733, A256607 (second iteration), A256758 (positions of records), A003434, A227944 (similarly built upon the totient function).

Programs

  • Haskell
    a256757 n = fst $ until ((== 1) . snd)
                (\(i, x) -> (i + 1, fromIntegral $ a007733 x)) (0, n)
    -- Reinhard Zumkeller, Apr 13 2015
  • Mathematica
    A007733 = Function[n, MultiplicativeOrder[2, n/(2^IntegerExponent[n, 2])]];
    a = Function[n, k = 0; m = n; While[m > 1, m = A007733[m]; k++]; k];
    Table[a[n], {n, 100}] (* Ivan Neretin, Apr 13 2015 *)
  • PARI
    a(n) = {if (n==1, return(0)); nb = 1; while((n = znorder(Mod(2, n/2^valuation(n, 2)))) != 1, nb++); nb;} \\ Michel Marcus, Apr 11 2015
    

Formula

For n>1, a(n) = a(A007733(n)) + 1.

A336935 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007733(i) = A007733(j) and A278222(i) = A278222(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 7, 5, 18, 10, 19, 3, 20, 11, 21, 6, 22, 12, 23, 2, 24, 13, 25, 7, 26, 14, 27, 4, 28, 15, 29, 8, 30, 16, 31, 1, 32, 17, 33, 9, 34, 7, 35, 5, 36, 18, 37, 10, 38, 19, 39, 3, 40, 20, 41, 11, 42, 21, 43, 6, 44, 22, 45, 12, 46, 23, 47, 2, 48, 24, 49, 13, 50
Offset: 1

Views

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A007733(n), A278222(n)].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ From A007733
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    Aux336935(n) = [A007733(n), A278222(n)];
    v336935 = rgs_transform(vector(up_to, n, Aux336935(n)));
    A336935(n) = v336935[n];

A336933 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007733(i) = A007733(j), for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of A007733.

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ From A007733
    v336933 = rgs_transform(vector(up_to, n, A007733(n)));
    A336933(n) = v336933[n];

A336934 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007733(i) = A007733(j) and A336158(i) = A336158(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 18, 3, 20, 11, 21, 6, 22, 12, 23, 2, 24, 13, 25, 7, 26, 14, 27, 4, 28, 15, 29, 8, 30, 16, 31, 1, 18, 17, 32, 9, 33, 18, 34, 5, 35, 19, 36, 10, 37, 18, 38, 3, 39, 20, 40, 11, 25, 21, 41, 6, 12, 22, 18, 12, 17, 23, 42, 2, 43, 24, 44, 13, 45, 25, 46, 7, 47
Offset: 1

Views

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A007733(n), A336158(n)].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ From A007733
    A000265(n) = (n>>valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A336158(n) = A046523(A000265(n));
    Aux336934(n) = [A007733(n), A336158(n)];
    v336934 = rgs_transform(vector(up_to, n, Aux336934(n)));
    A336934(n) = v336934[n];

A336936 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A007733(n), A329697(n), A331410(n)], for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 10, 4, 14, 8, 15, 1, 16, 9, 17, 5, 18, 10, 17, 3, 19, 11, 20, 6, 21, 12, 22, 2, 23, 13, 24, 7, 25, 10, 26, 4, 27, 14, 28, 8, 29, 15, 30, 1, 21, 16, 31, 9, 32, 17, 33, 5, 34, 18, 35, 10, 36, 17, 37, 3, 38, 19, 39, 11, 40, 20, 41, 6, 42, 21, 43, 12, 44, 22, 45, 2, 46, 23, 47, 13
Offset: 1

Views

Author

Antti Karttunen, Aug 11 2020

Keywords

Comments

Restricted growth sequence transform of the triplet [A007733(n), A329697(n), A331410(n)], or equally, of the ordered pair [A007733(n), A335880(n)].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ From A007733
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    Aux336936(n) = [A007733(n), A329697(n), A331410(n)];
    v336936 = rgs_transform(vector(up_to, n, Aux336936(n)));
    A336936(n) = v336936[n];

A351453 Lexicographically earliest infinite sequence such that a(i) = a(j) => A006530(i) = A006530(j) and A007733(i) = A007733(j) for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 4, 2, 9, 6, 10, 4, 11, 7, 12, 3, 13, 8, 14, 5, 15, 4, 16, 2, 7, 9, 17, 6, 18, 10, 8, 4, 19, 11, 20, 7, 21, 12, 22, 3, 23, 13, 9, 8, 24, 14, 25, 5, 10, 15, 26, 4, 27, 16, 11, 2, 8, 7, 28, 9, 29, 17, 30, 6, 31, 18, 13, 10, 32, 8, 33, 4, 34, 19, 35, 11, 9, 20, 15, 7, 36, 21, 8, 12, 37, 22, 38, 3, 39, 23, 32, 13, 40, 9, 41, 8, 17
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A006530(n), A007733(n)].
For all i, j >= 1: A324400(i) = A324400(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ This function from A007733
    Aux351453(n) = [A006530(n), A007733(n)];
    v351453 = rgs_transform(vector(up_to, n, Aux351453(n)));
    A351453(n) = v351453[n];

A296244 Odd numbers k such that A007733(k) is even but 2^x == -1 (mod k) is insoluble.

Original entry on oeis.org

15, 21, 35, 39, 45, 51, 55, 63, 69, 75, 77, 85, 87, 91, 93, 95, 105, 111, 115, 117, 119, 123, 133, 135, 141, 143, 147, 153, 155, 159, 165, 175, 183, 187, 189, 195, 203, 207, 213, 215, 219, 221, 225, 231, 235, 237, 245, 247, 253, 255, 259, 261, 267, 273, 275, 279, 285, 287
Offset: 1

Views

Author

Max Alekseyev, Dec 09 2017

Keywords

Crossrefs

Set difference of A296243 and A014657.

A333745 Numbers k such that the binary representations of 1/k and 1/(k+1) have the same period (A007733).

Original entry on oeis.org

1, 90, 104, 164, 286, 457, 665, 702, 740, 836, 975, 1458, 1469, 1628, 2071, 2146, 2625, 2849, 3800, 4441, 4575, 5233, 5284, 5418, 5715, 6039, 6073, 6387, 6458, 6601, 6649, 7384, 7417, 8029, 8521, 9817, 10136, 11306, 11439, 11497, 11642, 12402, 12651, 13050, 13322
Offset: 1

Views

Author

Amiram Eldar, Apr 03 2020

Keywords

Comments

Numbers k such that A007733(k) = A007733(k+1).

Examples

			1 is a term since A007733(1) = A007733(2) = 1.
90 is a term since A007733(90) = A007733(91) = 12.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := MultiplicativeOrder[2, n/(2^IntegerExponent[n, 2])]; Select[Range[10^4], f[#] == f[# + 1] &]
Showing 1-10 of 63 results. Next