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-5 of 5 results.

A097407 a(n) = (A097406(n) - 1)/n.

Original entry on oeis.org

0, 1, 2, 1, 6, 0, 18, 2, 8, 1, 8, 1, 630, 3, 10, 16, 7710, 1, 27594, 2, 16, 31, 7760, 10, 72, 105, 9728, 4, 72, 11, 69273666, 2048, 18166, 1285, 3512, 3, 16657248, 4599, 3112, 1542, 4012472, 129, 48834, 48, 518, 60787, 282224, 14, 90462791808, 81, 218, 31
Offset: 1

Views

Author

Marco Matosic, Aug 16 2004

Keywords

Crossrefs

Extensions

Edited by Vladeta Jovovic, Aug 26 2004

A086251 Number of primitive prime factors of 2^n - 1.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jul 14 2003

Keywords

Comments

A prime factor of 2^n - 1 is called primitive if it does not divide 2^r - 1 for any r < n. Equivalently, p is a primitive prime factor of 2^n - 1 if ord(2,p) = n. Zsigmondy's theorem says that there is at least one primitive prime factor for n > 1, except for n=6. See A086252 for those n that have a record number of primitive prime factors.
Number of odd primes p such that A002326((p-1)/2) = n. Number of occurrences of number n in A014664. - Thomas Ordowski, Sep 12 2017
The prime factors are not counted with multiplicity, which matters for a(364)=4 and a(1755)=6. - Jeppe Stig Nielsen, Sep 01 2020

Examples

			a(11) = 2 because 2^11 - 1 = 23*89 and both 23 and 89 have order 11.
		

Crossrefs

Cf. A046800, A046051 (number of prime factors, with repetition, of 2^n-1), A086252, A002588, A005420, A002184, A046801, A049093, A049094, A059499, A085021, A097406, A112927, A237043.

Programs

  • Mathematica
    Join[{0}, Table[cnt=0; f=Transpose[FactorInteger[2^n-1]][[1]]; Do[If[MultiplicativeOrder[2, f[[i]]]==n, cnt++ ], {i, Length[f]}]; cnt, {n, 2, 200}]]
  • PARI
    a(n) = sumdiv(n, d, moebius(n/d)*omega(2^d-1)); \\ Michel Marcus, Sep 12 2017
    
  • PARI
    a(n) = my(m=polcyclo(n, 2)); omega(m/gcd(m,n)) \\ Jeppe Stig Nielsen, Sep 01 2020

Formula

a(n) = Sum{d|n} mu(n/d) A046800(d), inverse Mobius transform of A046800.
a(n) <= A182590(n). - Thomas Ordowski, Sep 14 2017
a(n) = A001221(A064078(n)). - Thomas Ordowski, Oct 26 2017

Extensions

Terms to a(500) in b-file from T. D. Noe, Nov 11 2010
Terms a(501)-a(1200) in b-file from Charles R Greathouse IV, Sep 14 2017
Terms a(1201)-a(1206) in b-file from Max Alekseyev, Sep 11 2022

A118106 Period of the vector sequence d(n)^k mod n for k=1,2,3,..., where d(n) is the vector of divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 3, 4, 1, 1, 6, 1, 4, 6, 10, 1, 2, 1, 12, 1, 6, 1, 4, 1, 1, 10, 8, 12, 6, 1, 18, 3, 4, 1, 6, 1, 10, 12, 11, 1, 4, 1, 20, 16, 12, 1, 18, 5, 6, 18, 28, 1, 4, 1, 5, 6, 1, 4, 10, 1, 8, 22, 12, 1, 6, 1, 36, 20, 18, 30, 12, 1, 4, 1, 20, 1, 6, 16, 14, 28, 10, 1, 12, 12
Offset: 1

Views

Author

T. D. Noe, Apr 13 2006

Keywords

Comments

This sequence is related to the period of sigma_k(n) mod n. Note that a(n)=1 iff n is a power of a prime.
The record periods of p-1 occur at n=2p, where p is a prime with primitive root 2 (A001122). - T. D. Noe, Oct 25 2007
From Jianing Song, Nov 03 2019: (Start)
The smallest index m such that from the m-th term on, the sequence {d(n)^k mod n: k >= 0} enters into a cycle is m = A051903(n).
Let b(n) be the period of {sigma_k(n) mod n: k >= 0}, then b(n) | a(n) for all n, but generally they are not necessarily the same (for example, a(576) = 48 while b(576) = 16).
Every number m occurs in this sequence. Suppose m != 1, 6, by Zsigmondy's theorem, 2^m - 1 has at least one primitive factor p. Here a primitive factor p means that ord(2,p) = m. So we have a(2p) = lcm(ord(2,p), ord(p,2)) = m (see the formula below). Specially, we have a(2*A112927(m)) = a(2*A097406(m)) = m for m != 1, 6. (End)

Examples

			a(35)=12 because d(35)=(1,5,7,35) and (1,5,7,35)^k (mod 35) is the sequence of vectors (1,5,7,0), (1,25,14,0), (1,20,28,0), (1,30,21,0), (1,10,7,0), (1,15,14,0), (1,5,28,0), (1,25,21,0), (1,20,7,0), (1,30,14,0), (1,10,28,0), (1,15,21,0), (1,5,7,0),..., which has a period of 12.
		

Crossrefs

Cf. A118107 (period of the vector sequence d(n)^2^k mod n), A051903.

Programs

  • Mathematica
    Table[d=Divisors[n]; k=0; found=False; While[i=0; While[i
    				
  • PARI
    A118106(n) = { my(divs=apply(d -> (d%n),divisors(n)), odivs = Vec(divs), vs = Map()); mapput(vs, odivs, 0); for(k=1,oo,divs = vector(#divs,i,(divs[i]*odivs[i])%n); if(mapisdefined(vs, divs), return(k-mapget(vs, divs)), mapput(vs, divs, k))); }; \\ Antti Karttunen, Sep 23 2018
    
  • PARI
    a(n) = my(m=omega(n), M=vector(m^2),f=factor(n)); for(i=1, m, for(j=1, m, M[(i-1)*m+j]=if(i==j, 1, znorder(Mod(f[i,1],f[j,1]^f[j,2]))))); lcm(M) \\ Jianing Song, Nov 03 2019

Formula

Write n = Product_{i=1..t} p_i^e_i, then a(n) = lcm_{1<=i,j<=t, i!=j} ord(p_i,p_j^e_j), where ord(a,r) is the multiplicative order of a modulo r. - Jianing Song, Nov 03 2019

A336719 Largest odd prime p for which the order of 2 mod p is at most n.

Original entry on oeis.org

3, 7, 7, 31, 31, 127, 127, 127, 127, 127, 127, 8191, 8191, 8191, 8191, 131071, 131071, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
Offset: 2

Views

Author

Jeppe Stig Nielsen, Aug 01 2020

Keywords

Comments

a(1) is undefined.
Changing "at most n" to "equal to n" in the definition gives A097406.
The first term that is not a Mersenne prime (A000668) is 4432676798593.
For a version without duplicates, see A336720. For a list of all n where a(n) increases, see A336721.

Crossrefs

Programs

  • PARI
    re=0;for(n=2,+oo,p=vecmax(factor(2^n-1)[,1]);p>re&&re=p;print1(re,", "))

A098268 Unique prime factors of 2^n+1 are of the form kn+1. These are the values for k.

Original entry on oeis.org

2, 2, 0, 4, 2, 2, 6, 32, 2, 4, 62, 20, 210, 2, 8, 22, 4096, 2570, 2, 6, 9198, 3084, 258, 18, 96, 121574, 4, 28, 10, 162, 2, 6, 62, 3230, 563940, 2, 104592, 2, 44, 23091222
Offset: 1

Views

Author

Marco Matosic, Sep 01 2004

Keywords

Comments

The values for 2^n+1 are in A000051. In this sequence where a(n) has more than one k value they are separated with commas. See A097406 & A097407.

Programs

  • PARI
    isprimitivep(p, n) = {for (r=1, n-1, if (((2^r+1) % p) == 0, return (0));); return (1);}
    lista(n) = {f = factor(2^n+1); hasprim = 0;for(i=1, #f~, if (isprimitivep(f[i, 1], n), hasprim = 1; print1((f[i, 1]-1)/n, ", "););); if (! hasprim, print1(0, ", "));} \\ Michel Marcus, Jul 16 2013
Showing 1-5 of 5 results.