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 38 results. Next

A236433 List of primes generated by factoring successive primary pseudoperfect numbers (A054377).

Original entry on oeis.org

2, 2, 3, 2, 3, 7, 2, 3, 7, 43, 2, 3, 11, 23, 31, 2, 3, 11, 23, 31, 47059, 2, 3, 11, 17, 101, 149, 3109, 2, 3, 11, 23, 31, 47059, 2217342227, 1729101023519
Offset: 1

Views

Author

Jonathan Sondow, Jan 25 2014

Keywords

Comments

It is unknown whether there are infinitely many primary pseudoperfect numbers or any odd ones.
See A054377 for other comments, references, links, etc.
For prime factors of Giuga numbers, see A236434; of terms in Sylvester's sequence, see A126263.

Examples

			2 = 2.
6 = 2 * 3.
42 = 2 * 3 * 7.
1806 = 2 * 3 * 7 * 43.
47058 = 2 *  3 * 11 * 23 * 31.
2214502422 =  2 *  3 * 11 * 23 * 31 * 47059.
52495396602 =  2 * 3 * 11 * 17 * 101 * 149 * 3109.
8490421583559688410706771261086 = 2 *  3 * 11 * 23 * 31 * 47059 * 2217342227 * 1729101023519.
		

Crossrefs

Programs

  • Mathematica
    A054377 = Cases[Import["https://oeis.org/A054377/b054377.txt", "Table"], {, }][[All, 2]];
    First /@ Flatten[FactorInteger[A054377], 1] (* Robert Price, Mar 14 2020 *)

A216825 Prime factors of the first 8 primary pseudoperfect numbers A054377.

Original entry on oeis.org

2, 3, 7, 11, 17, 23, 31, 43, 101, 149, 3109, 47059, 2217342227, 1729101023519
Offset: 1

Views

Author

Jonathan Sondow, Sep 17 2012

Keywords

Comments

See A054377 for comments, references, and links.

Examples

			42 = 2*3*7 is the third primary pseudoperfect number, so 2, 3, 7 are members.
5 is not a factor of any of the first 8 primary pseudoperfect numbers, so 5 is not a member.
		

Crossrefs

Programs

  • Mathematica
    A054377 = Cases[Import["https://oeis.org/A054377/b054377.txt", "Table"], {, }][[All, 2]];
    Union[First /@ Flatten[FactorInteger[A054377], 1]] (* Robert Price, Mar 14 2020 *)

A216826 Largest prime factor of the n-th primary pseudoperfect number A054377(n).

Original entry on oeis.org

2, 3, 7, 43, 31, 47059, 3109, 1729101023519
Offset: 1

Views

Author

Jonathan Sondow, Sep 20 2012

Keywords

Comments

See A054377 for comments, references, and links.

Examples

			42 = 2*3*7 is the third primary pseudoperfect number, so a(3) = 7.
		

Crossrefs

Programs

A191975 Least common multiple of all p-1, where prime p divides the n-th primary pseudoperfect number A054377(n).

Original entry on oeis.org

1, 2, 6, 42, 330, 235290, 310800, 1863851053628494074457830
Offset: 1

Views

Author

Kieren MacMillan, Jun 20 2011

Keywords

Comments

a(n) is a factor of any exponent k > 0 such that 1^k + 2^k + ... + p^k == 1 (mod p), where p = A054377(n).

Examples

			A054377(3) = 42 = 2*3*7, so a(3) = lcm(2-1, 3-1, 7-1) = lcm(1,2,6) = 6.
		

Crossrefs

Cf. A054377.

Formula

a(n) = lcm(p-1 : prime p | A054377(n)).

A283311 a(n) = (A054377(n) - 6)/36.

Original entry on oeis.org

0, 1, 50, 1307, 61513956, 1458205461, 235845043987769122519632535030
Offset: 2

Views

Author

N. J. A. Sloane, Mar 07 2017

Keywords

Crossrefs

Cf. A054377.

A000058 Sylvester's sequence: a(n+1) = a(n)^2 - a(n) + 1, with a(0) = 2.

Original entry on oeis.org

2, 3, 7, 43, 1807, 3263443, 10650056950807, 113423713055421844361000443, 12864938683278671740537145998360961546653259485195807
Offset: 0

Views

Author

Keywords

Comments

Also called Euclid numbers, because a(n) = a(0)*a(1)*...*a(n-1) + 1 for n>0, with a(0)=2. - Jonathan Sondow, Jan 26 2014
Another version of this sequence is given by A129871, which starts with 1, 2, 3, 7, 43, 1807, ... .
The greedy Egyptian representation of 1 is 1 = 1/2 + 1/3 + 1/7 + 1/43 + 1/1807 + ... .
Take a square. Divide it into 2 equal rectangles by drawing a horizontal line. Divide the upper rectangle into 2 squares. Now you can divide the lower one into another 2 squares, but instead of doing so draw a horizontal line below the first one so you obtain a (2+1 = 3) X 1 rectangle which can be divided in 3 squares. Now you have a 6 X 1 rectangle at the bottom. Instead of dividing it into 6 squares, draw another horizontal line so you obtain a (6+1 = 7) X 1 rectangle and a 42 X 1 rectangle left, etc. - Néstor Romeral Andrés, Oct 29 2001
More generally one may define f(1) = x_1, f(2) = x_2, ..., f(k) = x_k, f(n) = f(1)*...*f(n-1)+1 for n > k and natural numbers x_i (i = 1, ..., k) which satisfy gcd(x_i, x_j) = 1 for i <> j. By definition of the sequence we have that for each pair of numbers x, y from the sequence gcd(x, y) = 1. An interesting property of a(n) is that for n >= 2, 1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n-1) = (a(n)-2)/(a(n)-1). Thus we can also write a(n) = (1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n-1) - 2 )/( 1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n-1) - 1). - Frederick Magata (frederick.magata(AT)uni-muenster.de), May 10 2001; [corrected by Michel Marcus, Mar 27 2019]
A greedy sequence: a(n+1) is the smallest integer > a(n) such that 1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n+1) doesn't exceed 1. The sequence gives infinitely many ways of writing 1 as the sum of Egyptian fractions: Cut the sequence anywhere and decrement the last element. 1 = 1/2 + 1/3 + 1/6 = 1/2 + 1/3 + 1/7 + 1/42 = 1/2 + 1/3 + 1/7 + 1/43 + 1/1806 = ... . - Ulrich Schimke, Nov 17 2002; [corrected by Michel Marcus, Mar 27 2019]
Consider the mapping f(a/b) = (a^3 + b)/(a + b^3). Starting with a = 1, b = 2 and carrying out this mapping repeatedly on each new (reduced) rational number gives 1/2, 1/3, 4/28 = 1/7, 8/344 = 1/43, ..., i.e., 1/2, 1/3, 1/7, 1/43, 1/1807, ... . Sequence contains the denominators. Also the sum of the series converges to 1. - Amarnath Murthy, Mar 22 2003
a(1) = 2, then the smallest number == 1 (mod all previous terms). a(2n+6) == 443 (mod 1000) and a(2n+7) == 807 (mod 1000). - Amarnath Murthy, Sep 24 2003
An infinite coprime sequence defined by recursion.
Apart from the initial 2, a subsequence of A002061. It follows that no term is a square.
It appears that a(k)^2 + 1 divides a(k+1)^2 + 1. - David W. Wilson, May 30 2004. This is true since a(k+1)^2 + 1 = (a(k)^2 - a(k) + 1)^2 +1 = (a(k)^2-2*a(k)+2)*(a(k)^2 + 1) (a(k+1)=a(k)^2-a(k)+1 by definition). - Pab Ter (pabrlos(AT)yahoo.com), May 31 2004
In general, for any m > 0 coprime to a(0), the sequence a(n+1) = a(n)^2 - m*a(n) + m is infinite coprime (Mohanty). This sequence has (m,a(0))=(1,2); (2,3) is A000215; (1,4) is A082732; (3,4) is A000289; (4,5) is A000324.
Any prime factor of a(n) has -3 as its quadratic residue (Granville, exercise 1.2.3c in Pollack).
Note that values need not be prime, the first composites being 1807 = 13 * 139 and 10650056950807 = 547 * 19569939581. - Jonathan Vos Post, Aug 03 2008
If one takes any subset of the sequence comprising the reciprocals of the first n terms, with the condition that the first term is negated, then this subset has the property that the sum of its elements equals the product of its elements. Thus -1/2 = -1/2, -1/2 + 1/3 = -1/2 * 1/3, -1/2 + 1/3 + 1/7 = -1/2 * 1/3 * 1/7, -1/2 + 1/3 + 1/7 + 1/43 = -1/2 * 1/3 * 1/7 * 1/43, and so on. - Nick McClendon, May 14 2009
(a(n) + a(n+1)) divides a(n)*a(n+1)-1 because a(n)*a(n+1) - 1 = a(n)*(a(n)^2 - a(n) + 1) - 1 = a(n)^3 - a(n)^2 + a(n) - 1 = (a(n)^2 + 1)*(a(n) - 1) = (a(n) + a(n)^2 - a(n) + 1)*(a(n) - 1) = (a(n) + a(n+1))*(a(n) - 1). - Mohamed Bouhamida, Aug 29 2009
This sequence is also related to the short side (or hypotenuse) of adjacent right triangles, (3, 4, 5), (5, 12, 13), (13, 84, 85), ... by A053630(n) = 2*a(n) - 1. - Yuksel Yildirim, Jan 01 2013, edited by M. F. Hasler, May 19 2017
For n >= 4, a(n) mod 3000 alternates between 1807 and 2443. - Robert Israel, Jan 18 2015
The set of prime factors of a(n)'s is thin in the set of primes. Indeed, Odoni showed that the number of primes below x dividing some a(n) is O(x/(log x log log log x)). - Tomohiro Yamada, Jun 25 2018
Sylvester numbers when reduced modulo 864 form the 24-term arithmetic progression 7, 43, 79, 115, 151, 187, 223, 259, 295, 331, ..., 763, 799, 835 which repeats itself until infinity. This was first noticed in March 2018 and follows from the work of Sondow and MacMillan (2017) regarding primary pseudoperfect numbers which similarly form an arithmetic progression when reduced modulo 288. Giuga numbers also form a sequence resembling an arithmetic progression when reduced modulo 288. - Mehran Derakhshandeh, Apr 26 2019
Named after the English mathematician James Joseph Sylvester (1814-1897). - Amiram Eldar, Mar 09 2024
Guy askes if it is an irrationality sequence (see Guy, 1981). - Stefano Spezia, Oct 13 2024

Examples

			a(0)=2, a(1) = 2+1 = 3, a(2) = 2*3 + 1 = 7, a(3) = 2*3*7 + 1 = 43.
		

References

  • Graham Everest, Alf van der Poorten, Igor Shparlinski and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 6.7.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994.
  • Richard K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E24.
  • Richard K. Guy and Richard Nowakowski, Discovering primes with Euclid. Delta, Vol. 5 (1975), pp. 49-63.
  • Amarnath Murthy, Smarandache Reciprocal partition of unity sets and sequences, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring 2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.1.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005267, A000945, A000946, A005265, A005266, A075442, A007018, A014117, A054377, A002061, A118227, A126263, A007996 (primes dividing some term), A323605 (smallest prime divisors), A091335 (number of prime divisors), A129871 (a variant starting with 1).

Programs

  • Haskell
    a000058 0 = 2
    a000058 n = a000058 m ^ 2 - a000058 m + 1 where m = n - 1
    -- James Spahlinger, Oct 09 2012
    
  • Haskell
    a000058_list = iterate a002061 2  -- Reinhard Zumkeller, Dec 18 2013
    
  • Julia
    a(n) = n == 0 ? BigInt(2) : a(n - 1)*(a(n - 1) - 1) + 1
    [a(n) for n in 0:8] |> println # Peter Luschny, Dec 15 2020
  • Maple
    A[0]:= 2:
    for n from 1 to 12 do
    A[n]:= A[n-1]^2 - A[n-1]+1
    od:
    seq(A[i],i=0..12); # Robert Israel, Jan 18 2015
  • Mathematica
    a[0] = 2; a[n_] := a[n - 1]^2 - a[n - 1] + 1; Table[ a[ n ], {n, 0, 9} ]
    NestList[#^2-#+1&,2,10] (* Harvey P. Dale, May 05 2013 *)
    RecurrenceTable[{a[n + 1] == a[n]^2 - a[n] + 1, a[0] == 2}, a, {n, 0, 10}] (* Emanuele Munarini, Mar 30 2017 *)
  • Maxima
    a(n) := if n = 0 then 2 else a(n-1)^2-a(n-1)+1 $
    makelist(a(n),n,0,8); /* Emanuele Munarini, Mar 23 2017 */
    
  • PARI
    a(n)=if(n<1,2*(n>=0),1+a(n-1)*(a(n-1)-1))
    
  • PARI
    A000058(n,p=2)={for(k=1,n,p=(p-1)*p+1);p} \\ give Mod(2,m) as 2nd arg to calculate a(n) mod m. - M. F. Hasler, Apr 25 2014
    
  • PARI
    a=vector(20); a[1]=3; for(n=2, #a, a[n]=a[n-1]^2-a[n-1]+1); concat(2, a) \\ Altug Alkan, Apr 04 2018
    
  • Python
    A000058 = [2]
    for n in range(1, 10):
        A000058.append(A000058[n-1]*(A000058[n-1]-1)+1)
    # Chai Wah Wu, Aug 20 2014
    

Formula

a(n) = 1 + a(0)*a(1)*...*a(n-1).
a(n) = a(n-1)*(a(n-1)-1) + 1; Sum_{i>=0} 1/a(i) = 1. - Néstor Romeral Andrés, Oct 29 2001
Vardi showed that a(n) = floor(c^(2^(n+1)) + 1/2) where c = A076393 = 1.2640847353053011130795995... - Benoit Cloitre, Nov 06 2002 (But see the Aho-Sloane paper!)
a(n) = A007018(n+1)+1 = A007018(n+1)/A007018(n) [A007018 is a(n) = a(n-1)^2 + a(n-1), a(0)=1]. - Gerald McGarvey, Oct 11 2004
a(n) = sqrt(A174864(n+1)/A174864(n)). - Giovanni Teofilatto, Apr 02 2010
a(n) = A014117(n+1)+1 for n = 0,1,2,3,4; a(n) = A054377(n)+1 for n = 1,2,3,4. - Jonathan Sondow, Dec 07 2013
a(n) = f(1/(1-(1/a(0) + 1/a(1) + ... + 1/a(n-1)))) where f(x) is the smallest integer > x (see greedy algorithm above). - Robert FERREOL, Feb 22 2019
From Amiram Eldar, Oct 29 2020: (Start)
Sum_{n>=0} (-1)^n/(a(n)-1) = A118227.
Sum_{n>=0} (-1)^n/a(n) = 2 * A118227 - 1. (End)

A031971 a(n) = Sum_{k=1..n} k^n.

Original entry on oeis.org

1, 5, 36, 354, 4425, 67171, 1200304, 24684612, 574304985, 14914341925, 427675990236, 13421957361110, 457593884876401, 16841089312342855, 665478473553144000, 28101527071305611528, 1262899292504270591313, 60182438244917445266889, 3031284048960901518840700
Offset: 1

Views

Author

Chris du Feu (chris(AT)beckingham0.demon.co.uk)

Keywords

Comments

From Alexander Adamchuk, Jul 21 2006: (Start)
p^(3k - 1) divides a(p^k) for prime p > 2 and k = 1, 2, 3, 4, ... or p^2 divides a(p) for prime p > 2. p^5 divides a(p^2) for prime p > 2. p^8 divides a(p^3) for prime p > 2. p^11 divides a(p^4) for prime p > 2.
p^2 divides a(2p) for prime p > 3. p^3 divides a(3p) for prime p > 2. p^2 divides a(4p) for prime p > 5. p^3 divides a(5p) for prime p > 3. p^2 divides a(6p) for prime p > 7.
p divides a(2p - 1) for all prime p. p^3 divides a(2p^2 - 1) for all prime p. p^5 divides a(2p^3 - 1) for all prime p.
p divides a((p - 1)/2) for p = 5, 13, 17, 29, 37, 41, 53, 61, ... = A002144 Pythagorean primes: primes of form 4n + 1.
(End)
If p prime then a(p-1) == -1 (mod p) [see De Koninck & Mercier reference]. Example: for p = 7, a(6) = 67171 = 7 * 9596 - 1. - Bernard Schott, Mar 06 2020

References

  • J.-M. De Koninck et A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 327 pp. 48-200, Ellipses, Paris (2004).
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 21.

Crossrefs

A diagonal of array A103438.
For a(n) mod n see A182398.

Programs

Formula

a(n) is asymptotic to (e/(e - 1))*n^n. - Benoit Cloitre, Dec 17 2003
a(n) = zeta(-n) - zeta(-n, n + 1), where zeta(s) is the Riemann zeta function and zeta(s, a) is the Hurwitz zeta function, a generalization of the Riemann zeta function. - Alexander Adamchuk, Jul 21 2006
a(n) == 1 (mod n) <==> n is in A014117 = 1, 2, 6, 42, 1806 (see the link "On the congruence ..."). - Jonathan Sondow, Oct 18 2013
a(A054377(n)) = A233045(n). - Jonathan Sondow, Dec 11 2013
a(n) = n! * [x^n] exp(x)*(exp(n*x) - 1)/(exp(x) - 1). - Ilya Gutkovskiy, Apr 07 2018
a(n) ~ ((e*n+1)/((e-1)*(n+1))) * n^n. - N. J. A. Sloane, Oct 13 2018, based on email from Claude F. Leibovici who claims this is slightly better than Cloitre's version when n is small.

A069359 a(n) = n * Sum_{p|n} 1/p where p are primes dividing n.

Original entry on oeis.org

0, 1, 1, 2, 1, 5, 1, 4, 3, 7, 1, 10, 1, 9, 8, 8, 1, 15, 1, 14, 10, 13, 1, 20, 5, 15, 9, 18, 1, 31, 1, 16, 14, 19, 12, 30, 1, 21, 16, 28, 1, 41, 1, 26, 24, 25, 1, 40, 7, 35, 20, 30, 1, 45, 16, 36, 22, 31, 1, 62, 1, 33, 30, 32, 18, 61, 1, 38, 26, 59, 1, 60, 1, 39, 40, 42, 18, 71, 1, 56
Offset: 1

Views

Author

Benoit Cloitre, Apr 15 2002

Keywords

Comments

Coincides with arithmetic derivative on squarefree numbers: a(A005117(n)) = A068328(n) = A003415(A005117(n)). - Reinhard Zumkeller, Jul 20 2003, Clarified by Antti Karttunen, Nov 15 2019
a(n) = n-1 iff n = 1 or n is a primary pseudoperfect number A054377. - Jonathan Sondow, Apr 16 2014
a(1) = 0 by the standard convention for empty sums.
“Seva” on the MathOverflow link asks if the iterates of this sequence are all eventually 0. - Charles R Greathouse IV, Feb 15 2019

Examples

			a(12) = 10 because the prime divisors of 12 are 2 and 3 so we have: 12/2 + 12/3 = 6 + 4 = 10. - _Geoffrey Critzer_, Mar 17 2015
		

Crossrefs

Cf. A322068 (partial sums), A323599 (Inverse Möbius transform).
Sequences of the form n^k * Sum_{p|n, p prime} 1/p^k for k = 0..10: A001221 (k=0), this sequence (k=1), A322078 (k=2), A351242 (k=3), A351244 (k=4), A351245 (k=5), A351246 (k=6), A351247 (k=7), A351248 (k=8), A351249 (k=9), A351262 (k=10).

Programs

  • Magma
    [0] cat [n*&+[1/p: p in PrimeDivisors(n)]:n in [2..80]]; // Marius A. Burtea, Jan 21 2020
    
  • Maple
    A069359 := n -> add(n/d, d = select(isprime, numtheory[divisors](n))):
    seq(A069359(i), i = 1..20); # Peter Luschny, Jan 31 2012
    # second Maple program:
    a:= n-> n*add(1/i[1], i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 23 2019
  • Mathematica
    f[list_, i_] := list[[i]]; nn = 100; a = Table[n, {n, 1, nn}]; b =
    Table[If[PrimeQ[n], 1, 0], {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Mar 17 2015 *)
  • PARI
    a(n) = n*sumdiv(n, d, isprime(d)/d); \\ Michel Marcus, Mar 18 2015
    
  • PARI
    a(n) = my(ps=factor(n)[,1]~);sum(k=1,#ps,n\ps[k]) \\ Franklin T. Adams-Watters, Apr 09 2015
    
  • Python
    from sympy import primefactors
    def A069359(n): return sum(n//p for p in primefactors(n)) # Chai Wah Wu, Feb 05 2022
  • Sage
    def A069359(n) :
        D = filter(is_prime, divisors(n))
        return add(n/d for d in D)
    print([A069359(i) for i in (1..20)]) # Peter Luschny, Jan 31 2012
    

Formula

G.f.: Sum(x^p(j)/(1-x^p(j))^2,j>=1), where p(j) is the j-th prime. - Vladeta Jovovic, Mar 29 2006
a(n) = A230593(n) - n. a(n) = A010051(n) (*) A000027(n), where operation (*) denotes Dirichlet convolution, that is, convolution of type: a(n) = Sum_(d|n) b(d) * c(n/d) = Sum_{d|n} A010051(d) * A000027(n/d). - Jaroslav Krizek, Nov 07 2013
a(A054377(n)) = A054377(n) - 1. - Jonathan Sondow, Apr 16 2014
Dirichlet g.f.: zeta(s - 1)*primezeta(s). - Geoffrey Critzer, Mar 17 2015
Sum_{k=1..n} a(k) ~ A085548 * n^2 / 2. - Vaclav Kotesovec, Feb 04 2019
From Antti Karttunen, Nov 15 2019: (Start)
a(n) = Sum_{d|n} A008683(n/d)*A323599(d).
a(n) = A003415(n) - A329039(n) = A230593(n) - n = A306369(n) - A000010(n).
a(n) = A276085(A329350(n)) = A048675(A329352(n)).
a(A276086(n)) = A329029(n), a(A328571(n)) = A329031(n).
(End)
a(n) = Sum_{d|n} A000010(d) * A001221(n/d). - Torlach Rush, Jan 21 2020
a(n) = Sum_{k=1..n} omega(gcd(n, k)). - Ilya Gutkovskiy, Feb 21 2020
a(p^k) = p^(k-1) for p prime and k>=1. - Wesley Ivan Hurt, Jul 15 2025

A007850 Giuga numbers: composite numbers n such that p divides n/p - 1 for every prime divisor p of n.

Original entry on oeis.org

30, 858, 1722, 66198, 2214408306, 24423128562, 432749205173838, 14737133470010574, 550843391309130318, 244197000982499715087866346, 554079914617070801288578559178, 1910667181420507984555759916338506
Offset: 1

Views

Author

D. Borwein, J. M. Borwein, P. B. Borwein and R. Girgensohn

Keywords

Comments

There are no other Giuga numbers with 8 or fewer prime factors. I did an exhaustive search using a PARI script which implemented Borwein and Girgensohn's method for finding n factor solutions given n - 2 factors. - Fred Schneider, Jul 04 2006
One further Giuga number is known with 10 prime factors, namely:
420001794970774706203871150967065663240419575375163060922876441614\
2557211582098432545190323474818 =
2 * 3 * 11 * 23 * 31 * 47059 * 2217342227 * 1729101023519 * 8491659218261819498490029296021 * 58254480569119734123541298976556403 but this may not be the next term. (See the Butske et al. paper.)
Conjecture: Giuga numbers are the solution of the differential equation n' = n + 1, where n' is the arithmetic derivative of n. - Paolo P. Lava, Nov 16 2009
n is a Giuga number if and only if n' = a*n + 1 for some integer a > 0 (see our preprint in arXiv:1103.2298). - José María Grau Ribas, Mar 19 2011
A composite number n is a Giuga number if and only if Sum_{i = 1..n-1} i^phi(n) == -1 (mod n), where phi(n) = A000010(n). - Jonathan Sondow, Jan 03 2014
A composite number n is a Giuga number if and only if Sum_{prime p|n} 1/p = 1/n + an integer. (In fact, all known Giuga numbers n satisfy Sum_{prime p|n} 1/p = 1/n + 1.) - Jonathan Sondow, Jan 08 2014
The prime factors of a(n) are listed as n-th row of A236434. - M. F. Hasler, Jul 13 2015
Conjecture: let k = a(n) and k be the product of x(n) distinct prime factors where x(n) <= x(n+1). Then, for any even n, n/2 + 2 <= x(n) <= n/2 + 3 and, for any odd n, (n+1)/2 + 2 <= x(n) <= (n+1)/2 + 3. For any n > 1, there are y "old" distinct prime factors o(1)...o(y) such that o(1) = 2, o(2) = 3, and z "new" distinct prime factors n(1)...n(z) such that none of them - unlike the "old" ones - can be a divisor of a(q) while q < n; n(1) > o(y), y = x(n) - z >= 2, 2 <= z <= b where b is either 4, or 1/2*n. - Sergey Pavlov, Feb 24 2017
Conjecture: a composite n is a Giuga number if and only if Sum_{k=1..n-1} k^lambda(n) == -1 (mod n), where lambda(n) = A002322(n). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
A composite number n is a Giuga number if and only if A326690(n) = 1. - Jonathan Sondow, Jul 19 2019
A composite n is a Giuga number if and only if n * A027641(phi(n)) == - A027642(phi(n)) (mod n^2). Note: Euler's phi function A000010 can be replaced by the Carmichael lambda function A002322. - Thomas Ordowski, Jun 07 2020
By von Staudt and Clausen theorem, a composite n is a Giuga number if and only if n * A027759(phi(n)) == A027760(phi(n)) (mod n^2). Note: Euler's phi function can be replaced by the Carmichael lambda function. - Thomas Ordowski, Aug 01 2020

Examples

			From _M. F. Hasler_, Jul 13 2015: (Start)
The prime divisors of 30 are {2, 3, 5}, and 2 divides 30/2-1 = 14, 3 divides 30/3-1 = 9, and 5 divides 30/5-1 = 5.
The prime divisors of 858 are {2, 3, 11, 13} and 858/2-1 = 428 is even, 858/3-1 = 285 is divisible by 3, 858/11-1 = 77 is a multiple of 11, and 858/13-1 = 65 = 13*5.
(End)
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 30, pp 11, Ellipses, Paris 2008.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := AllTrue[First /@ FactorInteger@ n, Divisible[n/# - 1, #] &]; Select[Range@ 100000, CompositeQ@ # && fQ@ # &] (* Michael De Vlieger, Oct 05 2015 *)
  • PARI
    is(n)=if(isprime(n), return(0)); my(f=factor(n)[,1]); for(i=1,#f, if((n/f[i])%f[i]!=1, return(0))); n>1 \\ Charles R Greathouse IV, Apr 28 2015
    
  • Python
    from itertools import count, islice
    from sympy import isprime, primefactors
    def A007850_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda x: not isprime(x) and all((x//p-1) % p == 0 for p in primefactors(x)), count(max(startvalue,2)))
    A007850_list = list(islice(A007850_gen(),4)) # Chai Wah Wu, Feb 19 2022

Formula

Sum_{i = 1..a(n)-1} i^phi(a(n)) == -1 (mod a(n)). - Jonathan Sondow, Jan 03 2014

Extensions

a(12) from Fred Schneider, Jul 04 2006
Further references from Fred Schneider, Aug 19 2006
Definition corrected by Jonathan Sondow, Sep 16 2012

A014117 Numbers n such that m^(n+1) == m (mod n) holds for all m.

Original entry on oeis.org

1, 2, 6, 42, 1806
Offset: 1

Views

Author

Keywords

Comments

"Somebody incorrectly remembered Fermat's little theorem as saying that the congruence a^{n+1} = a (mod n) holds for all a if n is prime" (Zagier). The sequence gives the set of integers n for which this property is in fact true.
If i == j (mod n), then m^i == m^j (mod n) for all m. The latter congruence generally holds for any (m, n)=1 with i == j (mod k), k being the order of m modulo n, i.e., the least power k for which m^k == 1 (mod n). - Lekraj Beedassy, Jul 04 2002
Also, numbers n such that n divides denominator of the n-th Bernoulli number B(n) (cf. A106741). Also, numbers n such that 1^n + 2^n + 3^n + ... + n^n == 1 (mod n). Equivalently, numbers n such that B(n)*n == 1 (mod n). Equivalently, Sum_{prime p, (p-1) divides n} n/p == -1 (mod n). It is easy to see that for n > 1, n must be an even squarefree number. Moreover, the set P of prime divisors of all such n satisfies the property: if p is in P, then p-1 is the product of distinct elements of P. This set is P = {2, 3, 7, 43}, implying that the sequence is finite and complete. - Max Alekseyev, Aug 25 2013
In 2005, B. C. Kellner proved E. W. Weisstein's conjecture that denom(B_n) = n only if n = 1806. - Jonathan Sondow, Oct 14 2013
Squarefree numbers n such that b^n == 1 (mod n^2) for every b coprime to n. Squarefree terms of A341858. - Thomas Ordowski, Aug 05 2024
Conjecture: Numbers n such that gcd(d+1, n) > 1 for every proper divisor d of n. Verified up to 10^696. - David Radcliffe, May 29 2025

Crossrefs

Squarefree terms of A124240. - Robert Israel and Thomas Ordowski, Jun 23 2017

Programs

  • Mathematica
    r[n_] := Reduce[ Mod[m^(n+1) - m, n] == 0, m, Integers]; ok[n_] := Range[n]-1 === Simplify[ Mod[ Flatten[ m /. {ToRules[ r[n][[2]] ]}], n], Element[C[1], Integers]]; ok[1] = True; A014117 = {}; Do[ If[ok[n], Print[n]; AppendTo[ A014117, n] ], {n, 1, 2000}] (* Jean-François Alcover, Dec 21 2011 *)
    Select[Range@ 2000, Function[n, Times @@ Boole@ Map[Function[m, PowerMod[m, n + 1, n] == Mod[m, n]], Range@ n] > 0]] (* Michael De Vlieger, Dec 30 2016 *)
  • Python
    [n for n in range(1, 2000) if all(pow(m, n+1, n) == m for m in range(n))] # David Radcliffe, May 29 2025

Formula

For n <= 5, a(n) = a(n-1)^2 + a(n-1) with a(0) = 1. - Raphie Frank, Nov 12 2012
a(n+1) = A007018(n) = A054377(n) = A100016(n) for n = 1, 2, 3, 4. - Jonathan Sondow, Oct 01 2013
Showing 1-10 of 38 results. Next