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.

A066341 Sum of distinct terms in n-th row of Fermat's triangle.

Original entry on oeis.org

1, 1, 1, 1, 8, 1, 1, 1, 12, 1, 14, 1, 16, 17, 1, 1, 20, 1, 22, 23, 24, 1, 26, 1, 28, 1, 30, 1, 94, 1, 1, 35, 36, 37, 38, 1, 40, 41, 42, 1, 130, 1, 46, 47, 48, 1, 50, 1, 52, 53, 54, 1, 56, 57, 58, 59, 60, 1, 184, 1, 64, 65, 1, 67, 202, 1, 70, 71, 214, 1, 74, 1, 76, 77, 78, 79, 238, 1
Offset: 2

Views

Author

Wouter Meeussen, Jan 01 2002

Keywords

Examples

			Fermat's triangle (A066340) is {1}, {1, 1}, {1, 0, 1}, {1, 1, 1, 1}, {1, 4, 3, 4, 1}, ... and the distinct terms in each row are {1}, {1}, {0, 1}, {1}, {1, 3, 4}, ... with sums 1, 1, 1, 1, 8, ...
		

Crossrefs

Programs

  • GAP
    List(List(List([2..80],n->List([1..n-1],m->PowerMod(m,Phi(n),n))),Set),Sum); # Muniru A Asiru, Aug 06 2018
  • Mathematica
    Plus@@@(Union/@Table[ (PowerMod[ #, EulerPhi[ k ], k ])&/@ Range[ k-1 ], {k, 2, 256} ]) or equivalently Table[ w=Length[ FactorInteger[ k ]];(2^(w-1)-1)*k+2^(w-1), {k, 2, 256} ]
  • PARI
    A066341(n) = { my(ph = eulerphi(n),m=Map(),t,s=0); for(k=1,n-1,t = ((k^ph)%n); if(!mapisdefined(m, t), s += t; mapput(m,t,t))); (s); }; \\ Antti Karttunen, Aug 06 2018
    

Formula

Conjectures from Ridouane Oudra, Apr 05 2025: (Start)
a(n) = (n+1)*2^(omega(n)-1) - n, where omega(n) = A001221(n).
a(n) = (n+1)*A007875(n) - n.
a(n) = (n/2)*A087893(n) + A007875(n). (End)

A200146 Triangle read by rows: T(n, k) = mod(k^(n - 1), n), where 1 <= k < n.

Original entry on oeis.org

1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 0, 3, 0, 5, 0, 7, 1, 4, 0, 7, 7, 0, 4, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Views

Author

Alonso del Arte, Nov 13 2011

Keywords

Comments

Per Fermat's Little theorem, if n is prime, then row n is all 1s. However, if n is composite, that does not necessarily guarantee that the first column 1 is the only one in the row.

Examples

			The first seven rows are
1
1, 1
1, 0, 3
1, 1, 1, 1
1, 2, 3, 4, 5
1, 1, 1, 1, 1, 1
1, 0, 3, 0, 5, 0, 7
We observe that the tenth row consists of the numbers 1 to 9 in order. In base 10, the least significant digit of n^9 is the same as that of n.
		

Crossrefs

Cf. A089072, A066340 (Fermat's triangle).

Programs

  • Mathematica
    Column[Table[Mod[k^(n - 1), n], {n, 2, 13}, {k, n - 1}], Center] (* Nov 14 2011 *)

A206786 Remainder of n^340 divided by 341.

Original entry on oeis.org

1, 1, 56, 1, 67, 56, 56, 1, 67, 67, 253, 56, 67, 56, 1, 1, 56, 67, 56, 67, 67, 253, 1, 56, 56, 67, 1, 56, 1, 1, 155, 1, 187, 56, 1, 67, 56, 56, 1, 67, 67, 67, 56, 253, 56, 1, 1, 56, 67, 56, 67, 67, 67, 1, 242, 56, 67, 1, 56, 1, 1, 155, 1, 1, 56, 187, 67
Offset: 1

Views

Author

Alonso del Arte, Feb 12 2012

Keywords

Comments

The n for which a(n) = 1 indicate the bases to which 341 is a Fermat pseudoprime. 341 is the smallest base 2 Fermat pseudoprime.
The only a(n) that occur are 0, 1, 56, 67, 155, 187, 242, 253. If n is one of these eight numbers, then a(n) = n.
Periodic with period 341. - Charles R Greathouse IV, May 01 2012

Examples

			a(2) = 1 because 2^340/341 leaves a remainder of 1 (the prime factors of 2^340 - 1 include 11 and 31).
a(3) = 56 because 3^340/341 leaves a remainder of 56 (the prime factors of 3^340 - 56 are 5, 11, 31 and a prime number with more than a hundred digits).
		

References

  • David Wells, Prime Numbers: The Most Mysterious Figures in Math. Hoboken, New Jersey: John Wiley & Sons (2005): 191

Crossrefs

Programs

Showing 1-3 of 3 results.