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.

Previous Showing 11-15 of 15 results.

A081727 Length of periods of Euler numbers modulo n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 6, 4, 6, 2, 10, 2, 6, 6, 2, 8, 8, 6, 18, 2, 6, 10, 22, 4, 10, 6, 18, 6, 14, 2, 30, 16, 10, 8, 6, 6, 18, 18, 6, 4, 20, 6, 42, 10, 6, 22, 46, 8, 42, 10, 8, 6, 26, 18, 10, 12, 18, 14, 58, 2, 30, 30, 6, 32, 6, 10, 66, 8, 22, 6, 70, 12, 36, 18, 10
Offset: 1

Views

Author

Benoit Cloitre, Apr 06 2003

Keywords

Comments

Terms after a(126) need more Euler numbers to check the period length. There are 85 unknown terms starting from a(127) till a(500) when 242 Euler numbers are used. - Hakan Icoz, Sep 06 2020

Examples

			A000364 modulo 5 gives : 1,1,0,1,0,1,0,1,0,1,0,... with period (1,0) of length 2, hence a(5)=2.
		

Crossrefs

Formula

a(n) = n-1 if n=2, 3, 7, 11, 19, 23, 31...is a prime == 2 or 3 (mod 4) (A045326).

Extensions

More terms from Hakan Icoz, Sep 06 2020

A331047 T(n,k) = -(-1)^k*ceiling(k/2)^2 mod p, where p is the n-th prime congruent to 2 or 3 mod 4; triangle T(n,k), n>=1, 0<=k<=p-1, read by rows.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 1, 6, 4, 3, 2, 5, 0, 1, 10, 4, 7, 9, 2, 5, 6, 3, 8, 0, 1, 18, 4, 15, 9, 10, 16, 3, 6, 13, 17, 2, 11, 8, 7, 12, 5, 14, 0, 1, 22, 4, 19, 9, 14, 16, 7, 2, 21, 13, 10, 3, 20, 18, 5, 12, 11, 8, 15, 6, 17, 0, 1, 30, 4, 27, 9, 22, 16, 15, 25, 6, 5
Offset: 1

Views

Author

Alois P. Heinz, Jan 08 2020

Keywords

Comments

Row n is a permutation of {0, 1, ..., A045326(n)-1}.

Examples

			Triangle T(n,k) begins:
  0, 1;
  0, 1,  2;
  0, 1,  6, 4,  3, 2,  5;
  0, 1, 10, 4,  7, 9,  2,  5, 6, 3,  8;
  0, 1, 18, 4, 15, 9, 10, 16, 3, 6, 13, 17, 2, 11, 8, 7, 12, 5, 14;
  ...
		

Crossrefs

Columns k=0-2 give: A000004, A000012, A281664 (for n>1).
Last elements of rows give A190105(n-1) for n>1.
Row lengths give A045326.
Row sums give A000217(A281664(n)).

Programs

  • Maple
    b:= proc(n) option remember; local p;
          p:= 1+`if`(n=1, 1, b(n-1));
          while irem(p, 4)<2 do p:= nextprime(p) od; p
        end:
    T:= n-> (p-> seq(modp(-(-1)^k*ceil(k/2)^2, p), k=0..p-1))(b(n)):
    seq(T(n), n=1..8);
  • Mathematica
    b[n_] := b[n] = Module[{p}, p = 1+If[n == 1, 1, b[n-1]]; While[Mod[p, 4]<2, p = NextPrime[p]]; p];
    T[n_] := With[{p = b[n]}, Table[Mod[-(-1)^k*Ceiling[k/2]^2, p], {k, 0, p-1}]];
    Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Oct 29 2021, after Alois P. Heinz *)

A331103 T(n,k) = -(-1)^k*k^2 mod p, where p is the n-th prime congruent to 2 or 3 mod 4; triangle T(n,k), n>=1, 0<=k<=p-1, read by rows.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 1, 3, 2, 5, 4, 6, 0, 1, 7, 9, 6, 3, 8, 5, 2, 4, 10, 0, 1, 15, 9, 3, 6, 2, 11, 12, 5, 14, 7, 8, 17, 13, 16, 10, 4, 18, 0, 1, 19, 9, 7, 2, 10, 3, 5, 12, 15, 6, 17, 8, 11, 18, 20, 13, 21, 16, 14, 4, 22, 0, 1, 27, 9, 15, 25, 26, 18, 29, 19, 24
Offset: 1

Views

Author

Alois P. Heinz, Jan 09 2020

Keywords

Comments

Row n is a permutation of {0, 1, ..., A045326(n)-1}.

Examples

			Triangle T(n,k) begins:
  0, 1;
  0, 1,  2;
  0, 1,  3, 2, 5, 4, 6;
  0, 1,  7, 9, 6, 3, 8,  5,  2, 4, 10;
  0, 1, 15, 9, 3, 6, 2, 11, 12, 5, 14, 7, 8, 17, 13, 16, 10, 4, 18;
  ...
		

Crossrefs

Columns k=0-1 give: A000004, A000012.
Last elements of rows give A281664.
Row lengths give A045326.
Row sums give A000217(A281664(n)).
Cf. A331047.

Programs

  • Maple
    b:= proc(n) option remember; local p;
          p:= 1+`if`(n=1, 1, b(n-1));
          while irem(p, 4)<2 do p:= nextprime(p) od; p
        end:
    T:= n-> (p-> seq(modp(-(-1)^k*k^2, p), k=0..p-1))(b(n)):
    seq(T(n), n=1..8);
  • Mathematica
    b[n_] := b[n] = Module[{p}, p = 1+If[n == 1, 1, b[n-1]]; While[Mod[p, 4]<2, p = NextPrime[p]]; p];
    T[n_] := With[{p = b[n]}, Table[Mod[-(-1)^k*k^2, p], {k, 0, p - 1}]];
    Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Oct 29 2021, after Alois P. Heinz *)

A081728 Length of periods of Euler numbers modulo prime(n).

Original entry on oeis.org

1, 2, 2, 6, 10, 6, 8, 18, 22, 14, 30, 18, 20, 42, 46, 26, 58, 30, 66, 70, 36, 78, 82, 44, 48, 50, 102, 106, 54, 56, 126, 130, 68, 138, 74, 150, 78, 162, 166, 86, 178, 90, 190, 96, 98, 198, 210, 222, 226, 114, 116, 238, 120, 250, 128, 262, 134, 270, 138, 140, 282, 146
Offset: 1

Views

Author

Benoit Cloitre, Apr 06 2003

Keywords

Comments

As proved by Kummer, if the actual signed Euler numbers (A122045) are used, then the period is prime(n)-1 for n>1. - T. D. Noe, Mar 16 2007

Examples

			A000364 modulo 5=prime(3) gives : 1,1,0,1,0,1,0,1,0,1,0,... with period (1,0) of length 2, hence a(3)=2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = Prime[n], t, d = Divisors[p - 1], dk, k = 1},t = Mod[Table[Abs@EulerE[2i], {i, 2, p}], p];While[dk = d[[k]];Nand @@ Equal @@@ Partition[Partition[t, dk], 2, 1], k++ ];dk];Array[f, 63] (* Ray Chandler, Mar 15 2007 *)

Formula

a(n)=prime(n)-1 if prime(n) == 2 or 3 (mod 4)

Extensions

More terms from John W. Layman, Jul 29 2005
Extended by Ray Chandler, Mar 15 2007

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

Views

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);
Previous Showing 11-15 of 15 results.