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

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

Views

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, ...

A177688 Numbers n such that (n+2)//n - (n+1) is prime, where // represents the concatenation of decimals.

Original entry on oeis.org

0, 1, 4, 6, 7, 9, 12, 13, 15, 18, 19, 22, 25, 28, 31, 33, 39, 46, 48, 49, 52, 60, 61, 64, 67, 73, 75, 84, 85, 88, 90, 99, 100, 103, 106, 132, 133, 135, 136, 138, 142, 156, 160, 163, 171, 178, 181, 183, 187, 190, 198, 201, 202, 211, 220, 222, 229, 238, 241, 246, 252
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 11 2010

Keywords

Comments

If n is a k-digit number, then we demand that p = (n+2) * 10^k + n - (n+1) is a prime number, obviously of the form p = (n+2) * 10^k - 1, so the decimal representation of p is n+1 followed by k times the digit 9.
The sequence is infinite, proof with Dirichlet's prime number (in arithmetic progressions) theorem.
Note that numbers of the form (n+2)//n + (n+1) are multiples of 3 and do not generate primes.

Examples

			2//0 - 1 = 20 - 1 = 19 = prime(8), 0 is first term;
3//1 - 2 = 31 - 2 = 29 = prime(10), 1 is 2nd term;
6//4 - 5 = 64 - 5 = 59 = prime(17), 4 is 3rd term.
		

Crossrefs

Programs

  • Mathematica
    n2ncQ[n_]:=PrimeQ[FromDigits[Join[IntegerDigits[n+2], IntegerDigits[ n]]]- n-1]; Select[Range[0,300],n2ncQ]  (* Harvey P. Dale, Feb 24 2011 *)
Showing 1-2 of 2 results.