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

A229299 Number of terms in A191677 less than or equal to 10^n.

Original entry on oeis.org

3, 30, 347, 3872, 41311, 430305, 4423115
Offset: 1

Views

Author

Keywords

Comments

0.50801 < lim A229299(n)/10^n = lim A229298(n)/10^n < 0.50966.
It seems that the convergence of A(n)/10^n is very slow; compare with A229298(n)/10^n.

Crossrefs

Programs

  • Mathematica
    fa=FactorInteger;Carlitz[k_,n_] := Mod[n-Sum[If[IntegerQ[k/(fa[n][[i,1]]-1)], n/fa[n][[i, 1]], 0], {i, 1, Length[fa[n]]}], n];supercar[k_, n_] := If[k == 1 || Mod[k,2] == 0 || Mod[n, 4] > 0, Carlitz[k, n], Mod[Carlitz[k, n] - n/2, n]]; Table[Print[Length@Select[Range[10^n], supercar[#-1,#] == 0 &]],{n, 1, 7}]

A121707 Numbers n > 1 such that n^3 divides Sum_{k=1..n-1} k^n = A121706(n).

Original entry on oeis.org

35, 55, 77, 95, 115, 119, 143, 155, 161, 187, 203, 209, 215, 221, 235, 247, 253, 275, 287, 295, 299, 319, 323, 329, 335, 355, 371, 377, 391, 395, 403, 407, 413, 415, 437, 455, 473, 475, 493, 497, 515, 517, 527, 533, 535, 539, 551, 559, 575, 581, 583, 589, 611
Offset: 1

Views

Author

Alexander Adamchuk, Aug 16 2006

Keywords

Comments

All terms belong to A038509 (Composite numbers with smallest prime factor >= 5). Many but not all terms belong to A060976 (Odd nonprimes, c, which divide Bernoulli(2*c)).
Many terms are semiprimes:
- the non-semiprimes are {275, 455, 475, 539, 575, 715, 775, 875, 935, ...}: see A321487;
- semiprime terms that are multiples of 5 have indices {7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, ...} = A002145 (Primes of form 4*k + 3, except 3, or k > 0; or Primes which are also Gaussian primes);
- semiprime terms that are multiples of 7 have indices {5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, ...} = A003627 (Primes of form 3*k - 1, except 2, or k > 1);
- semiprime terms that are multiples of 11 have indices {5, 7, 13, 17, 19, 23, 37, 43, 47, 53, 59, 67, 73, 79, 83, ...} = Primes of the form 4*k + 1 and 4*k - 1. [Edited by Michel Marcus, Jul 21 2018, M. F. Hasler, Nov 09 2018]
Conjecture: odd numbers n > 1 such that n divides Sum_{k=1..n-1} k^(n-1). - Thomas Ordowski and Robert Israel, Oct 09 2015. Professor Andrzej Schinzel (in a letter to me, dated Dec 29 2015) proved this conjecture. - Thomas Ordowski, Jul 20 2018
Note that n^2 divides Sum_{k=1..n-1} k^n for every odd number n > 1. - Thomas Ordowski, Oct 30 2015
Conjecture: these are "anti-Carmichael numbers" defined; n > 1 such that p - 1 does not divide n - 1 for every prime p dividing n. Equivalently, odd numbers n > 1 such that n is coprime to A027642(n-1). A number n > 1 is an "anti-Carmichael" if and only if gcd(n, b^n - b) = 1 for some integer b. - Thomas Ordowski, Jul 20 2018
It seems that these numbers are all composite terms of A317358. - Thomas Ordowski, Jul 30 2018
a(62) = 697 is the first term not in A267999: see A306097 for all these terms. - M. F. Hasler, Nov 09 2018
If the conjecture from Thomas Ordowski is true, then no term is a multiple of 2 or 3. - Jianing Song, Jan 27 2019
Conjecture: an odd number n > 1 is a term iff gcd(n, A027642(n-1)) = 1. - Thomas Ordowski, Jul 19 2019
Conjecture: Sequence consists of numbers n > 1 such that r = b^n + n - b will produce a prime for one or more integers b > 1. Only when n is in this sequence do one or more prime factors of n fail to divide r for all b. Also, n and b must be coprime for r to be prime. The above also applies to r = b^n - n - b, ignoring n=3, b=2. - Richard R. Forberg, Jul 18 2020
Odd numbers n > 1 such that Sum_{k(even)=2..n-1}2*k^(n-1) == 0 (mod n). - Davide Rotondo, Oct 28 2020
What is the asymptotic density of these numbers? The numbers A267999 have a slightly lower density. The difference between the densities is equal to the density of the numbers A306097. - Thomas Ordowski, Feb 15 2021
The asymptotic density of this sequence is in the interval (0.253, 0.265) (Ordowski, 2021). - Amiram Eldar, Feb 26 2021

Crossrefs

Cf. A000312, A002145, A002997, A027642, A031971, A038509, A060976, A121706, A267999 (probably a subsequence).
Cf. A306097 for terms of this sequence A121707 not in sequence A267999, A321487 for terms which are not semiprimes.
Cf. A191677 (n divides Sum_{k
Cf. A326478 for a conjectured connection with the Bernoulli numbers.

Programs

  • Maple
    filter:= n -> add(k &^ n mod n^3, k=1..n-1) mod n^3 = 0:
    select(filter, [$2..1000]); # Robert Israel, Oct 08 2015
  • Mathematica
    fQ[n_] := Mod[Sum[PowerMod[k, n, n^3], {k, n - 1}], n^3] == 0; Select[
    Range[2, 611], fQ] (* Robert G. Wilson v, Apr 04 2011 and slightly modified Aug 02 2018 *)
  • PARI
    is(n)=my(n3=n^3);sum(k=1,n-1,Mod(k,n3)^n)==0 \\ Charles R Greathouse IV, May 09 2013
    
  • PARI
    for(n=2, 1000, if(sum(k=1, n-1, k^n) % n^3 == 0, print1(n", "))) \\ Altug Alkan, Oct 15 2015
    
  • Sage
    # after Andrzej Schinzel
    def isA121707(n):
        if n == 1 or is_even(n): return False
        return n.divides(sum(k^(n-1) for k in (1..n-1)))
    [n for n in (1..611) if isA121707(n)] # Peter Luschny, Jul 18 2019

Extensions

Sequence corrected by Robert G. Wilson v, Apr 04 2011

A204187 a(n) = Sum_{m=1..n-1} m^(n-1) modulo n.

Original entry on oeis.org

0, 1, 2, 0, 4, 3, 6, 0, 6, 5, 10, 0, 12, 7, 10, 0, 16, 9, 18, 0, 14, 11, 22, 0, 20, 13, 18, 0, 28, 15, 30, 0, 22, 17, 0, 0, 36, 19, 26, 0, 40, 21, 42, 0, 21, 23, 46, 0, 42, 25, 34, 0, 52, 27, 0, 0, 38, 29, 58, 0, 60, 31, 42, 0, 52, 33, 66, 0, 46, 35, 70, 0
Offset: 1

Author

Jonathan Sondow, Jan 12 2012

Keywords

Comments

a(n) = n - 1 if n is 1 or a prime, by Fermat's little theorem. It is conjectured that the converse is also true; see A055032 and A201560 and note that a(n) = n-1 <==> A055032(n) = 1 <==> A201560(n) = 0.
As of 1991, Giuga and Bedocchi had verified no composite n < 10^1700 satisfies a(n) = n - 1 (Ribemboim, 1991). - Alonso del Arte, May 10 2013

Examples

			Sum(m^3, m = 1 .. 3) = 1^3 + 2^3 + 3^3 = 36 == 0 (mod 4), so a(4) = 0.
		

References

  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 6 of Hong Kong Mathematical Olympiad 2007 (find a(7)), page 134.
  • Richard K. Guy, Unsolved Problems in Number Theory, A17.
  • Paulo Ribemboim, The Little Book of Big Primes. New York: Springer-Verlag (1991): 17.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Sum[i^(n - 1), {i, n - 1}], n], {n, 75}] (* Alonso del Arte, May 10 2013 *)
  • PARI
    a(n) = lift(sum(i=1, n, Mod(i, n)^(n-1))); \\ Michel Marcus, Feb 23 2020
    
  • Python
    def a(n): return sum(pow(m, n-1, n) for m in range(1, n))%n
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Jan 02 2022

Formula

a(p) = p - 1 if p is prime, and a(4n) = 0.
a(n) + 1 == A201560(n) (mod n).
a(n) = n/2 iff n is of the form 4k+2 (conjectured). - Ivan Neretin, Sep 23 2016
a(4*k+2) = 2*k+1; for a proof see corresponding link. - Bernard Schott, Dec 29 2021

A228919 Numbers n such that 1^(n+1) + 2^(n+1) + ... + n^(n+1) == 0 (mod n).

Original entry on oeis.org

1, 4, 5, 7, 8, 11, 12, 13, 16, 17, 19, 20, 23, 24, 25, 28, 29, 31, 32, 36, 37, 40, 41, 43, 44, 47, 48, 49, 52, 53, 56, 59, 60, 61, 64, 65, 67, 68, 71, 72, 73, 76, 79, 80, 83, 84, 85, 88, 89, 91, 92, 96, 97, 100, 101, 103, 104, 107, 108, 109, 112, 113, 116
Offset: 1

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Mod[Sum[PowerMod[i, n + 1, n], {i, 1, n}], n]; Select[Range[1000], f[#] == 0 &]
  • PARI
    is(n)=my(m=n+1);sum(k=1,n,Mod(k,n)^m)==0 \\ Charles R Greathouse IV, Nov 20 2013

A229298 Number of terms in A228919 less than or equal to 10^n.

Original entry on oeis.org

5, 54, 515, 5109, 50933, 508932, 5087994
Offset: 1

Author

Keywords

Comments

0.50801 < lim A229298(n)/10^n = lim A229299(n)/10^n < 0.50966.
Compare with A229299(n)/10^n.

Crossrefs

Programs

  • Mathematica
    fa=FactorInteger; Carlitz[k_,n_] := Mod[n-Sum[If[IntegerQ[k/(fa[n][[i,1]]-1)], n/fa[n][[i, 1]], 0], {i, 1, Length[fa[n]]}], n]; supercar[k_, n_] := If[k == 1 || Mod[k,2] == 0 || Mod[n, 4] > 0, Carlitz[k, n], Mod[Carlitz[k, n] - n/2, n]]; Table[Print[Length@Select[Range[10^n], supercar[#+1,#] == 0 &]], {n, 1, 7}]

A277859 Least k > 1 such that 1^(k-1) + 2^(k-1) + 3^(k-1) + … + (k-1)^(k-1) - n == 0 (mod k).

Original entry on oeis.org

2, 3, 2, 4, 2, 7, 2, 3, 2, 11, 2, 4, 2, 3, 2, 4, 2, 19, 2, 3, 2, 23, 2, 4, 2, 3, 2, 4, 2, 31, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 9, 2, 3, 2, 47, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2, 59, 2, 4, 2, 3, 2, 4, 2, 45, 2, 3, 2, 15, 2, 4, 2, 3, 2, 4, 2, 9, 2, 3, 2, 83, 2, 4, 2
Offset: 1

Author

Paolo P. Lava, Nov 02 2016

Keywords

Comments

a(2*n-1) = 2.
a(n) = n + 1 for some prime n + 1 congruent to {2, 3} mod 4.

Examples

			a(8) = 3 because:
1^(2-1) - 8 = -7 but -7 mod 2 = 1;
1^(3-1) + 2^(3-1) - 8 = -3 and  -3 mod 3 = 0;
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local j,k,n; for n from 1 to q do for k from 2 to q do
    if (add(j^(k-1),j=1..k-1)-n) mod k=0 then print(k); break; fi; od; od; end: P(10^3);

A306431 Least number x > 1 such that n*x divides 1 + Sum_{k=1..x-1} k^(x-1).

Original entry on oeis.org

2, 3, 13, 7, 19, 31, 41, 31, 13, 19, 43, 31, 23, 83, 139, 31, 61, 67, 113, 79, 251, 43, 19, 31, 199, 23, 13, 167, 53, 139, 83, 127, 157, 67, 293, 431, 443, 151, 103, 79, 61, 251, 113, 47, 337, 19, 179, 31, 41, 199, 67, 23, 19, 499, 181, 367, 607, 139, 257, 359
Offset: 1

Author

Paolo P. Lava, Apr 05 2019

Keywords

Comments

If n = 1, all the solutions of x | 1 + Sum_{k=1..x-1} k^(x-1) should be prime numbers, according to Giuga's conjecture.
If n*x | 1 + Sum_{k=1..x-1} k^(x-1), then certainly x does, so Giuga's conjecture would say x must be prime. Similarly if x^n divides it, so does x, so again Giuga would say x is prime. - Robert Israel, Apr 26 2019
E.g., the first solution for x^2 | 1 + Sum_{k=1..x-1} k^(x-1) is x = 1277, that is prime.

Examples

			a(4) = 7 because (1 + 1^6 + 2^6 + 3^6 + 4^6 + 5^6 + 6^6) / (4*7) = 67172 / 28 = 2399 and it is the least prime to have this property.
		

Crossrefs

Cf. A191677. All the solutions for n = m: A000040 (m=1), A002145 (m=2), A007522 (m=4), A127576 (m=8), A141887 (m=10), A127578 (m=16), A142198 (m=20), A127579 (m=32), A095995 (m=50).

Programs

  • Maple
    P:=proc(j) local k,n; for n from 2 to 10^6 do
    if frac((add(k^(n-1),k=1..n-1)+1)/(j*n))=0
    then RETURN(n); break; fi; od; end: seq(P(i),i=1..60);
  • Mathematica
    a[n_] := For[x = 2, True, x++, If[Divisible[1+Sum[k^(x-1), {k, x-1}], n x], Return[x]]];
    Array[a, 60] (* Jean-François Alcover, Oct 16 2020 *)
  • PARI
    a(n) = my(x=2); while (((1 + sum(k=1, x-1, k^(x-1))) % (n*x)), x++); x; \\ Michel Marcus, Apr 27 2019

Formula

Least solution of n*x | 1 + Sum_{k=1..x-1} k^(x-1), for n = 1, 2, 3, ...

A308963 Lerch pseudoprimes: composite numbers m such that Sum_{k=1..m-1} k^{m-1} - (m-1)! == m (mod m^2).

Original entry on oeis.org

77, 161, 2261, 12839, 14231, 18668831, 1591100357
Offset: 1

Author

Amiram Eldar and Thomas Ordowski, Jul 03 2019

Keywords

Comments

According to Lerch's congruence (1905), if p is an odd prime, then Sum_{k=1..p-1} k^(p-1) - (p-1)! == p (mod p^2).
Equivalently, numbers m > 4 such that Sum_{k=1..m-1} k^(m-1) == m (mod m^2).
Equivalently, numbers m > 1 such that m*B_{m-1} == m (mod m^2), where B_k is the k-th Bernoulli number.
Equivalently, terms m of A121707 such that B_{m-1} == 1 (mod m).
Equivalently, numbers m > 1 such that A027641(m-1) == A027642(m-1) (mod m).
If m is a Lerch pseudoprime, then p-1 does not divide m-1 for every prime divisor p of m.
From M. F. Hasler, Jul 22 2019: (Start)
The Lerch primes A197632 satisfy Lerch's congruence "even" modulo p^3.
Up to a(7) all terms are either multiples of 7 or of 37, but not both. Will this pattern prevail?
We also note: a(1) = 7*11; a(2) = 7*(2*11 + 1) = a(1)/11*23; a(3) = 7*(2*7*23 + 1) = a(2)/23*17*19, a(5) = a(3)/17*107, i.e., a term in this subsequence has all but one of the prime factors of the preceding one. The subsequence (a(4), a(6), ...?) of terms divisible by 37 so far consists of semiprimes and therefore also has this property. (End)

Crossrefs

A subsequence of A191677 and A121707.

Programs

  • Mathematica
    s={}; Do[If[CompositeQ[n] && Mod[Sum[PowerMod[k, n-1, n^2], {k, 1, n-1}] - (n-1)! - n, n^2] == 0, AppendTo[s, n]],{n,1,2500}] ; s
  • PARI
    is_A308963(m)={sum(k=1,m-1,Mod(k,m^2)^(m-1))==m&&!isprime(m)&&m>4}
    forcomposite(m=1,,is_A308963(m)&&print1(m",")) \\ Slow beyond 10000. - M. F. Hasler, Jul 22 2019

Extensions

a(6)-a(7) from Max Alekseyev, Jul 09 2019
Showing 1-8 of 8 results.