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

A193432 Number of divisors of n^2 + 1.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 4, 4, 2, 4, 4, 8, 2, 4, 2, 8, 6, 4, 2, 8, 4, 8, 2, 4, 2, 8, 4, 4, 4, 8, 6, 8, 4, 4, 2, 8, 6, 4, 2, 6, 4, 12, 4, 4, 4, 16, 4, 4, 4, 4, 4, 8, 2, 8, 2, 16, 4, 4, 4, 4, 4, 8, 4, 4, 2, 8, 8, 4, 6, 4, 8, 16, 2, 8, 4, 8, 4, 4, 4, 8, 6, 16, 2
Offset: 0

Views

Author

Michel Lagneau, Jul 28 2011

Keywords

Examples

			a(7) = 6 because 7^2 + 1 = 50 and the 6 divisors are {1, 2, 5, 10, 25, 50}.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 0 to 110 do:n1:=nops(divisors(n^2+1)):s:=0:for m from 1 to n1 do: s:=s+1:od: printf(`%d, `, s):od:
  • Mathematica
    Array[DivisorSigma[0, #^2 + 1] &, 85, 0] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    a(n) = numdiv(n^2+1); \\ Michel Marcus, Mar 16 2018
    
  • Python
    from sympy import divisor_count
    def A193432(n): return divisor_count(n**2+1) # Chai Wah Wu, Apr 17 2025

Formula

a(n) = A000005(A002522(n)). - Michel Marcus, Mar 16 2018

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

A339461 Number of Fibonacci divisors of n^2 + 1.

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 1, 3, 3, 2, 1, 2, 2, 4, 1, 2, 1, 3, 3, 2, 1, 4, 2, 3, 1, 2, 1, 3, 2, 2, 1, 3, 2, 3, 3, 2, 1, 3, 2, 2, 1, 2, 2, 3, 2, 2, 1, 5, 2, 2, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 2, 2, 2, 3, 1, 2, 1, 3, 2, 2, 3, 2, 2, 4, 1, 2, 1, 3, 2, 2, 1, 3, 2, 4, 1, 2, 2
Offset: 0

Views

Author

Michel Lagneau, Dec 06 2020

Keywords

Examples

			a(13) = 4 because the divisors of 13^2 + 1 = 170 are {1, 2, 5, 10, 17, 34, 85, 170} with 4 Fibonacci divisors: 1, 2, 5 and 34.
		

Crossrefs

Programs

  • Maple
    with(numtheory):with(combinat,fibonacci):nn:=100:F:={}:
    for k from 1 to nn do:
      F:=F union {fibonacci(k)}:
    od:
       for n from 0 to 90 do:
        f:=n^2+1:d:=divisors(f):
        lst:= F intersect d: n1:=nops(lst):printf(`%d, `,n1):
       od:
  • Mathematica
    Array[DivisorSum[#^2 + 1, 1 &, Or @@ Map[IntegerQ@ Sqrt[#] &, 5 #^2 + 4 {-1, 1}] &] &, 105, 0] (* Michael De Vlieger, Dec 07 2020 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || issquare(k-8);
    a(n) = sumdiv(n^2+1, d, isfib(d)); \\ Michel Marcus, Dec 06 2020

Formula

a(A005574(n)) = 1 for n > 2.
a(n) = A005086(A002522(n)). - Michel Marcus, Dec 06 2020

A344869 Number of distinct prime factors of n^n+1.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 3, 3, 3, 4, 3, 6, 4, 5, 5, 6, 2, 3, 7, 5, 3, 6, 4, 8, 6, 7, 5, 11, 6, 7, 10, 7, 4, 11, 6, 13, 5, 7, 7, 8, 9, 6, 10, 8, 8, 14, 8, 10, 6, 7, 10, 11, 5, 8, 14, 11, 7, 13, 13, 9, 12, 8, 7, 18, 4, 12, 8, 7, 7, 16, 9, 8, 12, 4, 8, 24, 7, 9, 14, 7, 5, 12, 6, 12, 8, 13, 10, 12, 10, 6, 23, 15, 6, 9, 11, 16, 3, 8, 17, 23, 7
Offset: 0

Views

Author

Seiichi Manyama, May 31 2021

Keywords

Crossrefs

Programs

  • Magma
    [#PrimeDivisors(n^n+1): n in [0..100]];
  • Mathematica
    a[0] = 1; a[n_] := PrimeNu[n^n + 1]; Array[a, 45, 0] (* Amiram Eldar, May 31 2021 *)
  • PARI
    a(n) = omega(n^n+1);
    

Formula

a(n) = A001221(A014566(n)).

Extensions

a(67)-a(79) from Jon E. Schoenfield, May 31 2021
a(80)-a(100) from Seiichi Manyama, May 31 2021

A067268 Numbers k such that k and k^2+1 have the same number of distinct prime factors.

Original entry on oeis.org

2, 4, 12, 15, 16, 18, 22, 28, 34, 35, 38, 39, 44, 45, 46, 48, 50, 51, 52, 58, 62, 65, 68, 69, 76, 80, 82, 85, 86, 88, 92, 95, 96, 100, 104, 105, 106, 108, 118, 132, 136, 138, 141, 144, 145, 152, 158, 159, 164, 166, 171, 174, 175, 178, 188, 194, 196, 201, 202, 205
Offset: 1

Views

Author

Benoit Cloitre, Feb 21 2002

Keywords

Examples

			2 is a term since omega(2) = omega(2^2+1) = 1.
		

Crossrefs

Programs

  • Magma
    [k:k in [1.. 210 ]| #PrimeDivisors(k) eq #PrimeDivisors(k^2+1)]; // Marius A. Burtea, Feb 18 2020
  • Mathematica
    Select[Range[250],PrimeNu[#]==PrimeNu[#^2+1]&] (* Harvey P. Dale, Feb 07 2019 *)

Formula

Numbers k such that omega(k) = omega(k^2+1).

A260258 T(n,k) is the array read by rows, n>0 and k=1..q (with q = number of prime distinct divisors of n^2+1) giving the number of occurrences of the k-th prime divisor of n^2+1 counted from the prime divisors of m^2+1 for m=1..n.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Jul 21 2015

Keywords

Comments

A002313(n) are the numbers such that T(n,k)>1 for all k=1..q.
T(2n-1,1)=n and T(m,1)=1 if m =1, 2, 4, 6, 10, 14, ... = A005574(n)(numbers n such that n^2 + 1 is prime). The length of row n is A128428(n).

Examples

			T(13,k) = [7,6,2] for k = 1,2,3 because 13^2+1 = 2*5*17 =>
The number of occurrences of the prime divisor 2 is 7: 1^2+1=2, 3^2+1=2*5, 5^2+1=2*13, 7^2+1=2*5^2, 9^2+1=2*41, 11^2+1=2*61 and 13^2+1=2*5*17;
The number of occurrences of the prime divisor 5 is 6: 2^2+1=5, 3^2+1=2*5, 7^2+1=2*5^2, 8^2+1=5*13, 12^2+1=5*29;
The number of occurrences of the prime divisor 17 is 2: 4^2+1=17 and 13^2+1=2*5*17.
The array begins:
  [1]
  [1]
  [2,2]
  [1]
  [3,1]
  [1]
  [4,3]
  [4,2]
  [5,2]
  [1]
  ...
		

Crossrefs

Programs

  • Maple
    with(numtheory):lst:={2}:nn:=1000:T:=array(1..270,[0$270]):
    for j from 1 to nn do:
       p:=4*j+1:
       if isprime(p)
       then
       lst:=lst union {p}:
       fi:
    od:
       nn0:=nops(lst):
       for n from 1 to 60 do:
         q:=factorset(n^2+1):n0:=nops(q):
         for k from 1 to n0 do:
          for m from 1 to 270 do:
          if q[k]=lst[m] then T[m]:=T[m]+1:printf(`%d, `, T[m]):
          fi:
         od:
        od:
    od:

A261609 Number of composite divisors of n^2+1.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 3, 1, 1, 0, 1, 1, 4, 0, 1, 0, 4, 3, 1, 0, 4, 1, 4, 0, 1, 0, 4, 1, 1, 1, 4, 3, 4, 1, 1, 0, 4, 3, 1, 0, 3, 1, 8, 1, 1, 1, 11, 1, 1, 1, 1, 1, 4, 0, 4, 0, 12, 1, 1, 1, 1, 1, 4, 1, 1, 0, 4, 5, 1, 3, 1, 4, 11, 0, 4, 1, 4, 1, 1, 1, 4, 3, 11, 0, 1, 1
Offset: 1

Views

Author

Michel Lagneau, Aug 26 2015

Keywords

Examples

			a(7) = 3 because the composite divisors of 7^2+1 are 10, 25, 50.
		

Crossrefs

Programs

Formula

a(n) = A055212(A002522(n)).

A284477 Pairs of integers (x, y), such that x^2 + 1 and y^2 + 1, 1 < y < x, have the same distinct prime factors.

Original entry on oeis.org

7, 3, 18, 8, 117, 43, 239, 5, 378, 132, 843, 377, 2207, 987, 2943, 73, 4443, 53, 4662, 1568, 6072, 5118, 8307, 743, 8708, 2112, 9872, 2738, 31561, 4929, 103682, 46368, 271443, 121393, 853932, 76378, 1021693, 91383, 3539232, 41218, 3699356, 473654
Offset: 1

Views

Author

Michel Lagneau, Mar 27 2017

Keywords

Comments

The sequence appears to thin out quite abruptly; however, by solving the Diophantine equation x^2 + 1 = p (y^2 + 1) for a suitable prime p and selecting the solutions (x, y) for which p divides y^2 + 1, it is easy to generate larger pairs, such as (423222288438379883442890018716361, 66096216900526495715353522199871). - Giovanni Resta, Mar 27 2017
A very interesting property: the sequence contains a subsequence of pairs (Lucas numbers L(i), Fibonacci numbers F(i)) for i = 4, 6, 14, 16, 24, 36, ... These pairs are (L(4), F(4)), (L(6), F(6)), (L(14), F(14)), (L(16), F(16)), (L(24), F(24)), (L(26), F(26)), (L(34), F(34)), ... = (7, 3), (18, 8), (843, 377), (2207, 987), (103682, 46368), (271443, 121393), (12752043, 5702887), ... It seems that {i} = A090773(n) (numbers that are congruent to {4, 6} mod 10). - Michel Lagneau, Mar 28 2017
This is because L(i)^2+1 = 5*(F(i)^2+1) for even i, and 5 | F(i)^2 + 1 for i== 3,4,6,7 (mod 10). In fact (L(i), F(i)) for i in A090773 are the solutions of the generalized Pell equation x^2 + 1 = 5 (y^2 + 1) for which 5 | y^2 + 1. - Robert Israel, Apr 10 2017

Examples

			The pair (843, 377) is in the sequence because the prime factors of 843^2 + 1 and 377^2 + 1 are 2, 5, 61 and 233.
		

Crossrefs

Programs

  • Maple
    A:= NULL:
    for x from 2 to 10^5 do
      P:= numtheory:-factorset(x^2+1);
      if not assigned(R[P]) then R[P]:= x
      else A:= A, op(map(t -> (x,t), [R[P]]));
           R[P]:= R[P],x
      fi
    od:
    A; # Robert Israel, Apr 10 2017
  • Mathematica
    d[n_] := First /@ FactorInteger[n]; Flatten@ Reap[ Do[ dx = d[x^2+1]; Do[ If[ dx == d[y^2+1], Sow[{x, y}]], {y, x-1}], {x, 1, 10^4}]][[2, 1]]
  • PARI
    upto(n) = {my(l = List(), res=List()); for(i=1, n, f = factor(i^2+1)[, 1]; listput(l, [f, i])); listsort(l); for(i=1, n-1, if(l[i][1]==l[i+1][1], listput(res, [l[i+1][2], l[i][2]]))); listsort(res); res} \\ David A. Corneth, Mar 28 2017

Extensions

a(29)-a(34) from Giovanni Resta, Mar 27 2017
a(35)-a(42) from David A. Corneth, Mar 28 2017

A381605 Number of distinct prime divisors of n^3+1.

Original entry on oeis.org

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

Views

Author

Joost de Winter, Mar 01 2025

Keywords

Crossrefs

Programs

  • MATLAB
    function result = a(n)
    result = numel(unique(factor(sym(n^3+1))));
    end
    
  • Maple
    f:= proc(n) nops(numtheory:-factorset(n^3+1)) end proc:
    map(f, [$1..50]); # Robert Israel, Apr 03 2025
  • Mathematica
    Table[PrimeNu[n^3 + 1], {n, 1, 30}]
  • PARI
    a(n) = omega(n^3+1); \\ Michel Marcus, Mar 01 2025
    
  • PARI
    a(n)=if(n%3==2, omega((n+1)/3^valuation(n+1,3)) + omega((n^2-n+1)/3^valuation(n^2-n+1,3)) + 1, omega(n+1) + omega(n^2-n+1)) \\ Charles R Greathouse IV, Mar 03 2025

Formula

a(n) = A001221(A001093(n)).
a(n) > 1 for n > 2. - Charles R Greathouse IV, Mar 03 2025
Showing 1-9 of 9 results.