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.

A180278 Smallest nonnegative integer k such that k^2 + 1 has exactly n distinct prime factors.

Original entry on oeis.org

0, 1, 3, 13, 47, 447, 2163, 24263, 241727, 2923783, 16485763, 169053487, 4535472963, 36316463227, 879728844873, 4476534430363, 119919330795347, 1374445897718223, 106298577886531087
Offset: 0

Views

Author

Michel Lagneau, Jan 17 2011

Keywords

Examples

			a(2) = 3 because the 2 distinct prime factors of 3^2 + 1 are {2, 5};
a(10) = 16485763 because the 10 distinct prime factors of 16485763^2 + 1 are {2, 5, 13, 17, 29, 37, 41, 73, 149, 257}.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{k = 1}, If[n == 0, Return[0]]; Monitor[While[PrimeNu[k^2 + 1] != n, k++]; k, {n, k}]]; Table[a[n], {n, 0, 8}] (* Robert P. P. McKone, Sep 13 2023 *)
  • PARI
    a(n)=for(k=0, oo, if(omega(k^2+1) == n, return(k))) \\ Andrew Howroyd, Sep 12 2023
  • Python
    from itertools import count
    from sympy import factorint
    def A180278(n):
        return next(k for k in count() if len(factorint(k**2+1)) == n) # Pontus von Brömssen, Sep 12 2023
    

Formula

a(n) >= sqrt(A185952(n)-1). - Charles R Greathouse IV, Feb 17 2015
a(n) <= A164511(n). - Daniel Suteu, Feb 20 2023

Extensions

a(9), a(10) and example corrected; a(11) added by Donovan Johnson, Aug 27 2012
a(12) from Giovanni Resta, May 10 2017
a(13)-a(17) from Daniel Suteu, Feb 20 2023
Name clarified and incorrect programs removed by Pontus von Brömssen, Sep 12 2023
a(18) from Max Alekseyev, Feb 24 2024

A082863 Number of distinct prime factors of n^2-1.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 3, 2, 3, 2, 2, 3, 3, 3, 3, 3, 2, 3, 2, 3, 2, 4, 2, 3, 3, 2, 4, 3, 3, 3, 3, 3, 3, 4, 2, 4, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 4, 2, 4, 3, 2, 4, 3, 3, 4, 3, 4, 3, 4, 2, 3, 3, 3, 4, 4, 3, 4, 2, 3, 2, 4, 3, 4, 4, 3, 3, 4, 3, 4, 4, 3, 4, 3, 3, 3, 3, 3, 3
Offset: 2

Views

Author

Jon Perry, May 24 2003

Keywords

Comments

This is a very slowly growing sequence - by n=100000 the maximum value is 8.
If n is in A014574 then a(n) = 2. - Robert Israel, Aug 05 2014

Examples

			a(11)=3 because (11-1)*(11+1)=10*12=2^3*3*5, which has 3 distinct prime factors, namely 2,3 and 5.
		

Crossrefs

Cf. A001221, A014574, A219017 (greedy inverse).

Programs

Formula

a(n) = A001221((n-1)*(n+1)).
a(n) = A001221(n-1) + A001221(n+1) + ((-1)^n - 1)/2. - Robert Israel, Aug 05 2014

A365326 a(n) is the smallest positive number k such that k^2 - 1 and k^2 + 1 each have exactly n distinct prime divisors.

Original entry on oeis.org

2, 5, 13, 83, 463, 4217, 169333, 2273237, 23239523, 512974197, 5572561567
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 01 2023

Keywords

Crossrefs

Cf. A088075 (with k instead of k^2).

Programs

  • PARI
    isok(k, n) = (omega(k^2-1)==n) && (omega(k^2+1)==n);
    a(n) = my(k=2); while (!isok(k, n), k++); k; \\ Michel Marcus, Sep 03 2023

Formula

a(n) >= max(A219017(n), A180278(n)). - Daniel Suteu, Sep 03 2023

Extensions

a(9)-a(11) from Amiram Eldar, Sep 03 2023
Showing 1-3 of 3 results.