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.

A366671 Smallest prime dividing 8^n + 1.

Original entry on oeis.org

2, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5, 3, 193, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5, 3, 641, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5, 3, 193, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5, 3, 769, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5
Offset: 0

Views

Author

Sean A. Irvine, Oct 15 2023

Keywords

Comments

a(n) = 3 if n is odd. a(n) = 5 if n == 2 (mod 4). - Robert Israel, Nov 20 2023

Crossrefs

Programs

  • Maple
    P1000:= mul(ithprime(i),i= 4..1000):
    f:= proc(n) local t;
      if n::odd then return 3 elif n mod 4 = 2 then return 5 fi;
      t:= igcd(8^n+1,P1000);
      if t <> 1 then min(numtheory:-factorset(t)) else min(numtheory:-factorset(8^n+1)) fi
    end proc:
    map(f, [$0..100]); # Robert Israel, Nov 20 2023
  • Mathematica
    Table[FactorInteger[8^n + 1][[1,1]], {n, 0, 78}] (* Paul F. Marrero Romero, Oct 20 2023 *)
  • Python
    from sympy import primefactors
    def A366671(n): return min(primefactors((1<<3*n)+1)) # Chai Wah Wu, Oct 16 2023

Formula

a(n) = A020639(A062395(n)). - Paul F. Marrero Romero, Oct 20 2023
a(n) = A002586(3*n) for n >= 1. - Robert Israel, Nov 20 2023