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

A232570 Numbers k that divide tribonacci(k) (A000073(k)).

Original entry on oeis.org

1, 8, 16, 19, 32, 47, 53, 64, 103, 112, 128, 144, 155, 163, 192, 199, 208, 221, 224, 256, 257, 269, 272, 299, 311, 368, 397, 401, 419, 421, 448, 499, 512, 587, 599, 617, 640, 683, 757, 768, 773, 784, 863, 883, 896, 907, 911, 929, 936, 991, 1021, 1024
Offset: 1

Views

Author

Seiichi Manyama, Jun 17 2016

Keywords

Comments

Inspired by A023172 (numbers k such that k divides Fibonacci(k)).
Includes all primes p such that x^3-x^2-x-1 has 3 distinct roots in the field GF(p) (A106279). - Robert Israel, Feb 07 2018
Includes 2^k for k >= 3. - Robert Israel, Jul 26 2024

Crossrefs

Programs

  • Maple
    with(LinearAlgebra[Modular]):
    T:= (n, m)-> MatrixPower(m, Mod(m, <<0|1|0>,
        <0|0|1>, <1|1|1>>, float[8]), n)[1, 3]:
    a:= proc(n) option remember; local k; if n=1
          then 1 else for k from 1+a(n-1)
          while T(k$2)>0 do od; k fi
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Feb 05 2018
  • Mathematica
    trib = LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 2000]; Reap[Do[If[Divisible[ trib[[n+1]], n], Print[n]; Sow[n]], {n, 1, Length[trib]-1}]][[2, 1]] (* Jean-François Alcover, Mar 22 2019 *)
  • Ruby
    require 'matrix'
    def power(a, n, mod)
      return Matrix.I(a.row_size) if n == 0
      m = power(a, n >> 1, mod)
      m = (m * m).map{|i| i % mod}
      return m if n & 1 == 0
      (m * a).map{|i| i % mod}
    end
    def f(m, n)
      ary0 = Array.new(m, 0)
      ary0[0] = 1
      v = Vector.elements(ary0)
      ary1 = [Array.new(m, 1)]
      (0..m - 2).each{|i|
        ary2 = Array.new(m, 0)
        ary2[i] = 1
        ary1 << ary2
      }
      a = Matrix[*ary1]
      mod = n
      (power(a, n, mod) * v)[m - 1]
    end
    def a(n)
      (1..n).select{|i| f(3, i) == 0}
    end

A106302 Period of the Fibonacci 3-step sequence A000073 mod prime(n).

Original entry on oeis.org

4, 13, 31, 48, 110, 168, 96, 360, 553, 140, 331, 469, 560, 308, 46, 52, 3541, 1860, 1519, 5113, 5328, 3120, 287, 8011, 3169, 680, 51, 1272, 990, 12883, 5376, 5720, 18907, 3864, 7400, 2850, 8269, 162, 9296, 2494, 32221, 10981, 36673, 4656, 3234, 198, 5565
Offset: 1

Views

Author

T. D. Noe, May 02 2005, Sep 18 2008

Keywords

Comments

This sequence differs from the corresponding Lucas sequence (A106294) at n=1 and 5 because these correspond to the primes 2 and 11, which are the prime factors of -44, the discriminant of the characteristic polynomial x^3-x^2-x-1. We have a(n) < prime(n) for the primes in A106279.

Crossrefs

Programs

  • Mathematica
    n=3; Table[p=Prime[i]; a=Join[{1},Table[0,{n-1}]]; a=Mod[a,p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i,60}]
  • Python
    from itertools import count
    from sympy import prime
    def A106302(n):
        a = b = (0,)*2+(1 % (p:= prime(n)),)
        for m in count(1):
            b = b[1:] + (sum(b) % p,)
            if a == b:
                return m # Chai Wah Wu, Feb 27 2022

Formula

a(n) = A046738(prime(n)).

A033209 Primes of form x^2 + 11*y^2.

Original entry on oeis.org

11, 47, 53, 103, 163, 199, 257, 269, 311, 397, 401, 419, 421, 499, 587, 599, 617, 683, 757, 773, 863, 883, 907, 911, 929, 991, 1021, 1087, 1109, 1123, 1181, 1237, 1291, 1307, 1367, 1433, 1439, 1543, 1567, 1571, 1609, 1621, 1697, 1699, 1753, 1873, 1907, 2003
Offset: 1

Views

Author

Keywords

Comments

Primes p such that the polynomial x^3-x^2-x-1 mod p has 3 zeros. Compare A106279. - T. D. Noe, May 02 2005

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.

Crossrefs

Primes in A243651.

Programs

  • Mathematica
    QuadPrimes2[1, 0, 11, 10000] (* see A106856 *)

Extensions

Extended by T. D. Noe, Apr 17 2012

A106276 Number of distinct zeros of x^3-x^2-x-1 mod prime(n).

Original entry on oeis.org

1, 0, 0, 1, 2, 1, 1, 1, 0, 1, 0, 0, 1, 1, 3, 3, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 3, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 3, 1, 1, 0, 0, 0, 1, 1, 3, 1, 0, 1, 0, 1, 1, 1, 0, 3, 1, 3, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 3, 3, 1, 3, 3, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 3, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This polynomial is the characteristic polynomial of the Fibonacci and Lucas 3-step recursions, A000073 and A001644. Similar polynomials are treated in Serre's paper. The discriminant of the polynomial is -44 = -4*11. The primes p yielding 3 distinct zeros, A106279, correspond to the periods of the sequences A000073(k) mod p and A001644(k) mod p having length less than p. The Lucas 3-step sequence mod p has two additional primes p for which the period is less than p: 2 and 11, which are factors of the discriminant -44. For p=11, the Fibonacci 3-step sequence mod p has a period of p(p-1).

Crossrefs

Cf. A106273 (discriminant of the polynomial x^n-x^(n-1)-...-x-1), A106293 (period of the Lucas 3-step sequences mod prime(n)), A106282 (prime moduli for which the polynomial is irreducible).

Programs

  • Mathematica
    Table[p=Prime[n]; cnt=0; Do[If[Mod[x^3-x^2-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 150}]

A106294 Period of the Lucas 3-step sequence A001644 mod prime(n).

Original entry on oeis.org

1, 13, 31, 48, 10, 168, 96, 360, 553, 140, 331, 469, 560, 308, 46, 52, 3541, 1860, 1519, 5113, 5328, 3120, 287, 8011, 3169, 680, 51, 1272, 990, 12883, 5376, 5720, 18907, 3864, 7400, 2850, 8269, 162, 9296, 2494, 32221, 10981, 36673, 4656, 3234, 198, 5565
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This sequence differs from the corresponding Fibonacci sequence (A106302) at n=1 and 5 because these correspond to the primes 2 and 11, which are the prime factors of -44, the discriminant of the characteristic polynomial x^3-x^2-x-1. We have a(n) < prime(n) for the primes 2, 11 and A106279.
For a prime p, the period depends on the zeros of x^3-x^2-x-1 mod p. If there are 3 zeros, then the period is < p. If there are no zeros, then the period is p^2+p+1 or a simple fraction of p^2+p+1. Also note that the period can be prime, as for p=3, 5, 31, 59, 71, 89, 97, 157, 223. When the period is prime, the orbits have a simple structure. [From T. D. Noe, Sep 18 2008]

Crossrefs

Programs

  • Mathematica
    n=3; Table[p=Prime[i]; a=Join[Table[ -1, {n-1}], {n}]; a=Mod[a, p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i, 60}]

Formula

a(n) = A106293(prime(n)).

A211671 Least prime p such that the polynomial x^n - x^(n-1) - ... - 1 (mod p) has n distinct zeros.

Original entry on oeis.org

2, 11, 47, 137, 691, 25621, 59233, 2424511, 2607383, 78043403, 1032758989, 80051779
Offset: 1

Views

Author

T. D. Noe, Apr 18 2012

Keywords

Comments

This is the characteristic polynomial of the n-step Fibonacci and Lucas sequences. For composite p, the polynomial can have more than n zeros! See A211672.

Examples

			For p = 11, x^2-x-1 = (x+3)(x+7) (mod p).
For p = 47, x^3-x^2-x-1 = (x+21)(x+30)(x+42) (mod p).
For p = 137, x^4-x^3-x^2-x-1 = (x+12)(x+79)(x+85)(x+97) (mod p).
		

Crossrefs

Cf. A045468 (n=2), A106279 (n=3), A106280 (n=4), A106281 (n=5).
Cf. A211672 (for composite p).

Programs

  • Mathematica
    Table[poly = x^n - Sum[x^k, {k, 0, n - 1}]; k = 1; While[p = Prime[k]; cnt = 0; Do[If[Mod[poly, p] == 0, cnt++], {x, 0, p - 1}]; cnt < n, k++]; p, {n, 5}]
  • PARI
    a(n)={my(P=x^n-sum(k=0, n-1, x^k) ); forprime(p=2, oo, if(#polrootsmod(P,p)==n, return(p) ) );} \\ Joerg Arndt, Apr 15 2013

Extensions

a(8)-a(10) from Joerg Arndt, Apr 15 2013
a(11)-a(12) from Jinyuan Wang, Apr 25 2025
Showing 1-6 of 6 results.