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

A143548 Irregular triangle of numbers k < p^2 such that p^2 divides k^(p-1)-1, with p=prime(n).

Original entry on oeis.org

1, 1, 8, 1, 7, 18, 24, 1, 18, 19, 30, 31, 48, 1, 3, 9, 27, 40, 81, 94, 112, 118, 120, 1, 19, 22, 23, 70, 80, 89, 99, 146, 147, 150, 168, 1, 38, 40, 65, 75, 110, 131, 134, 155, 158, 179, 214, 224, 249, 251, 288, 1, 28, 54, 62, 68, 69, 99, 116, 127, 234, 245, 262, 292, 293, 299, 307, 333, 360
Offset: 1

Views

Author

T. D. Noe, Aug 24 2008

Keywords

Comments

Row n begins with 1 and has prime(n)-1 terms. The first differences of each row are symmetric. For k > p^2, the solutions are just shifted by m*p^2 for m > 0. An open question is whether every integer appears in this sequence. For instance, 2 does not appear until the prime 1093 and 5 does not appear until the prime 20771.
For row n > 1, the sum of the terms in row n is (p-1)*p^2*(p+1)/2, which is A138416. - T. D. Noe, Aug 24 2008, corrected by Robert Israel, Sep 27 2016
Max Alekseyev points out that there is a much faster method of computing these numbers. Let p=prime(n) and let r be a primitive root of p (see A001918 and A060749). Then the terms in row n are r^(k*p) (mod p^2) for k=0..p-2. - T. D. Noe, Aug 26 2008
The numbers in this sequence are the bases to Euler pseudoprimes q, which are squares of prime numbers, such that n^((q-1)/2) == +-1 mod q. An exception is the first number 9 = 3*3, which is, following the strict definition in Crandall and Pomerance, no Fermat pseudoprime and hence no Euler pseudoprime. - Karsten Meyer, Jan 08 2011
For row n > 1, the sum is zero modulo p^2 (rows are antisymmetric due to Binomial Theorem). - Peter A. Lawrence, Sep 11 2016

Examples

			(2)   1,
(3)   1, 8,
(5)   1, 7, 18, 24,
(7)   1, 18, 19, 30, 31, 48,
(11)  1, 3, 9, 27, 40, 81, 94, 112, 118, 120,
(13)  1, 19, 22, 23, 70, 80, 89, 99, 146, 147, 150, 168,
(17)  1, 38, 40, 65, 75, 110, 131, 134, 155, 158, 179, 214, 224, 249, 251, 288,
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2005

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,j,x;
      p:= ithprime(n);
      x:= numtheory:-primroot(p);
      op(sort([seq(x^(i*p) mod p^2, i=0..p-2)]))
    end proc:
    map(f, [$1..20]); # Robert Israel, Sep 27 2016
  • Mathematica
    Flatten[Table[p=Prime[n]; Select[Range[p^2], PowerMod[ #,p-1,p^2]==1&], {n,50}]] (* T. D. Noe, Aug 24 2008 *)
    Flatten[Table[p=Prime[n]; r=PrimitiveRoot[p]; b=PowerMod[r,p,p^2]; Sort[NestList[Mod[b*#,p^2]&,1,p-2]], {n,50}]] (* Faster version from T. D. Noe, Aug 26 2008 *)

A135177 a(n) = p^2*(p-1), where p = prime(n).

Original entry on oeis.org

4, 18, 100, 294, 1210, 2028, 4624, 6498, 11638, 23548, 28830, 49284, 67240, 77658, 101614, 146068, 201898, 223260, 296274, 352870, 383688, 486798, 564898, 697048, 903264, 1020100, 1082118, 1213594, 1283148, 1430128, 2032254, 2230930
Offset: 1

Views

Author

Omar E. Pol, Nov 25 2007

Keywords

Examples

			a(4) = 294 because the 4th prime number is 7, 7^2 = 49, 7-1 = 6 and 49 * 6 = 294.
		

Crossrefs

Cf. A001248 (p^2), A030078 (p^3), A045991 (n^2 * (n-1)), A065414, A065483, A138416 (terms halved), A152441.
Column 4 of A379010.

Programs

Formula

a(n) = p^3 - p^2 = A030078(n) - A001248(n).
a(n) = A000010(prime(n)^3). - R. J. Mathar, Oct 15 2017
Sum_{n>=1} 1/a(n) = A152441. - Amiram Eldar, Nov 09 2020
From Amiram Eldar, Nov 22 2022: (Start)
Product_{n>=1} (1 + 1/a(n)) = A065483.
Product_{n>=1} (1 - 1/a(n)) = A065414. (End)
a(n) = 2*A138416(n). - Antti Karttunen, Dec 14 2024

A138459 a(n) = ((n-th prime)^6-(n-th prime)^4)/12.

Original entry on oeis.org

4, 54, 1250, 9604, 146410, 399854, 2004504, 3909630, 12313004, 49509670, 73881680, 213654354, 395606540, 526495354, 897861304, 1846372554, 3514034690, 4292210710, 7536519254, 10672906020, 12608819004, 20254042120, 27241076254
Offset: 1

Views

Author

Artur Jasinski, Mar 22 2008

Keywords

Comments

Differences (p^k-p^m)/q such that k > m:
p^2-p is given in A036689
(p^2-p)/2 is given in A008837
p^3-p is given in A127917
(p^3-p)/2 is given in A127918
(p^3-p)/3 is given in A127919
(p^3-p)/6 is given in A127920
p^3-p^2 is given in A135177
(p^3-p^2)/2 is given in A138416
p^4-p is given in A138401
(p^4-p)/2 is given in A138417
p^4-p^2 is given in A138402
(p^4-p^2)/2 is given in A138418
(p^4-p^2)/3 is given in A138419
(p^4-p^2)/4 is given in A138420
(p^4-p^2)/6 is given in A138421
(p^4-p^2)/12 is given in A138422
p^4-p^3 is given in A138403
(p^4-p^3)/2 is given in A138423
p^5-p is given in A138404
(p^5-p)/2 is given in A138424
(p^5-p)/3 is given in A138425
(p^5-p)/5 is given in A138426
(p^5-p)/6 is given in A138427
(p^5-p)/10 is given in A138428
(p^5-p)/15 is given in A138429
(p^5-p)/30 is given in A138430
p^5-p^2 is given in A138405
(p^5-p^2)/2 is given in A138431
p^5-p^3 is given in A138406
(p^5-p^3)/2 is given in A138432
(p^5-p^3)/3 is given in A138433
(p^5-p^3)/4 is given in A138434
(p^5-p^3)/6 is given in A138435
(p^5-p^3)/8 is given in A138436
(p^5-p^3)/12 is given in A138437
(p^5-p^3)/24 is given in A138438
p^5-p^4 is given in A138407
(p^5-p^4)/2 is given in A138439
p^6-p is given in A138408
(p^6-p)/2 is given in A138440
p^6-p^2 is given in A138409
(p^6-p^2)/2 is given in A138441
(p^6-p^2)/3 is given in A138442
(p^6-p^2)/4 is given in A138443
(p^6-p^2)/5 is given in A138444
(p^6-p^2)/6 is given in A138445
(p^6-p^2)/10 is given in A138446
(p^6-p^2)/12 is given in A138447
(p^6-p^2)/15 is given in A138448
(p^6-p^2)/20 is given in A122220
(p^6-p^2)/30 is given in A138450
(p^6-p^2)/60 is given in A138451
p^6-p^3 is given in A138410
(p^6-p^3)/2 is given in A138452
p^6-p^4 is given in A138411
(p^6-p^4)/2 is given in A138453
(p^6-p^4)/3 is given in A138454
(p^6-p^4)/4 is given in A138455
(p^6-p^4)/6 is given in A138456
(p^6-p^4)/8 is given in A138457
(p^6-p^4)/12 is given in A138458
(p^6-p^4)/24 is given in A138459
p^6-p^5 is given in A138412
(p^6-p^5)/2 is given in A138460

Programs

  • Mathematica
    a = {}; Do[p = Prime[n]; AppendTo[a, (p^6 - p^4)/12], {n, 1, 24}]; a
  • PARI
    forprime(p=2,1e3,print1((p^6-p^4)/12", ")) \\ Charles R Greathouse IV, Jul 15 2011
Showing 1-3 of 3 results.