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-20 of 23 results. Next

A334080 Number of Pythagorean triples among the divisors of 60*n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 3, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 6, 4, 6, 2, 8, 2, 6, 4, 5, 4, 9, 2, 4, 6, 8, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 9, 2, 8, 4, 8, 4, 4, 2, 12, 2, 4, 6, 7, 6, 8, 2, 8, 4, 9, 2, 12, 2, 4, 6, 6, 4, 12, 2, 10, 5, 4, 2, 12, 4
Offset: 1

Views

Author

Michel Lagneau, Apr 14 2020

Keywords

Comments

The odd numbers of the sequence are rare (see the table below).
The subsequence of odd terms begins with 1, 3, 3, 3, 5, 3, 5, 9, 3, 9, 7, 9, 5, 9, 9, 3, 11, 15, 5, 9, 5, 15, 9, 9, 9, 5, 19, 3, 15, 15, 9, ... (see the table at the link).
It is interesting to note that each set of divisors of A169823(n) contains m primitive Pythagorean triples for some n, m = 1, 2, ...
Examples:
- The set of divisors of A169823(1)= 60 contains only one primitive Pythagorean triple: (3, 4, 5).
- The set of divisors of A169823(136) = 8160 contains two primitive Pythagorean triples: (3, 4, 5) and (8, 15, 17).
- The set of divisors of A169823(910) = 54600 contains three primitive Pythagorean triples: (3, 4, 5), (5, 12, 13) and (7, 24, 25).
There is an interesting property: we observe that a(n) = A000005(n) except for n in the set {13, 26, 34, 39, 52, 65, 68, 70, 78, 91, 102, ...}. This set contains subset of numbers of the form 13*k, 34*k, 70*k, 203*k, 246*k, 259*k, ... for k = 1, 2, ...
We recognize the sequence A081752: {13, 34, 70, 203, 246, 259, 671, ...} (ordered product of the sides of primitive Pythagorean triangles divided by 60).
The following table shows the numbers of odd terms < 10^k for k = 2, 3, 4, 5, 6 and 7. For instance, among the 16 multiples of 60 less than 10^3, the divisors of the five numbers 60, 240, 540, 780 and 960 contain 1, 3, 3, 3 and 5 Pythagorean triples respectively, and that represents 31.25% of odd numbers.
+---------------+-----------------+---------------------+----------+
| Intervals | Number of | Number of odd terms | |
| D(k) < 10^k | multiples of 60 | in D(k) | % |
| k = 2,3,...,7 | in D(k) | | |
+---------------+-----------------+---------------------+----------+
| < 10^2 | 1 | 1 | 100% |
| < 10^3 | 16 | 5 | 31.250% |
| < 10^4 | 166 | 18 | 10.843% |
| < 10^5 | 1666 | 72 | 4.321% |
| < 10^6 | 16666 | 256 | 1.536% |
| < 10^7 | 166666 | 879 | 0.527% |
|---------------+-----------------+---------------------+----------+

Examples

			a(4) = 3 because the divisors of A169823(4) = 240 are {1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 40, 48, 60, 80, 120, 240} with 3 Pythagorean triples: (3, 4, 5), (6, 8, 10) and (12, 16, 20). The first triple is primitive.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 60 by 60 to 5400 do :
       d:=divisors(n):n0:=nops(d):it:=0:
        for i from 1 to n0-1 do:
         for j from i+1 to n0-2 do :
          for m from i+2 to n0 do:
           if d[i]^2 + d[j]^2 = d[m]^2
            then
            it:=it+1:
            else
           fi:
          od:
         od:
        od:
        printf(`%d, `,it):
       od:
  • PARI
    ishypo(n) = setsearch(Set(factor(n)[, 1]%4), 1); \\ A009003
    a(n) = {n *= 60; my(d=divisors(n), nb=0); for (i=3, #d, if (ishypo(d[i]), for (j=2, i-1, for (k=3, j-1, if (d[j]^2 + d[k]^2 == d[i]^2, nb++););););); nb;} \\ Michel Marcus, Apr 26 2020

A217448 Least k > 0 such that 1 + n^2 and 1 + (n+k)^2 have the same smallest prime factor.

Original entry on oeis.org

2, 6, 2, 26, 2, 74, 2, 4, 2, 404, 2, 6, 2, 366, 2, 514, 2, 4, 2, 1564, 2, 6, 2, 1106, 2, 4010, 2, 4, 2, 34, 2, 6, 2, 10, 2, 2594, 2, 4, 2, 22334, 2, 6, 2, 16, 2, 58, 2, 4, 2, 64, 2, 6, 2, 29062, 2, 18710, 2, 4, 2, 10, 2, 6, 2, 42, 2, 17428, 2, 4, 2, 16, 2, 6
Offset: 1

Views

Author

Michel Lagneau, Oct 03 2012

Keywords

Comments

Alternate title: Least k > 0 such that A089120(n) = A089120(n+k).
A089120(n): smallest prime factor of n^2 + 1.
Conjecture: a(n) exists for all n.

Examples

			a(10) = 404 because 10^2 + 1 = 101, (10+404)^2+1 = 101*1697 so A089120(10) = A089120(414) = 101;
a(170) = 404274 because 170^2 + 1 = 28901, (170+404274)^2+1 = 163574949137 = 28901* 5659837 so A089120(170) = A089120(40444) = 28901.
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..100): for n from 1 to 100 do:x:=factorset(n^2+1):n1:=nops(x): T[n] := x[1]:od:for a from 1 to 80 do:p:=T[a]:ii:=0:for k from 1 to 50000 while(ii=0) do: z:=factorset((a+k)^2+1): n2:=nops(z):if z[1]=p then printf(`%d, `,k):ii:=1:else fi:od:od:
  • Mathematica
    sspf[n_]:=Module[{c=FactorInteger[1+n^2][[1,1]],k=1},While[ FactorInteger[ 1+ (n+k)^2][[1,1]]!=c,k++];k]; Array[sspf,80] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A217448(n) = { my(spf=A020639(1+(n^2)), x); for(k=1,oo,x=1+((n+k)^2); if(!(x%spf) && A020639(x)==spf,return(k))); }; \\ Antti Karttunen, May 24 2021

A247339 a(n) is the least number k such that the greatest prime divisor of k^2+1 is the smallest prime divisor of n^2+1.

Original entry on oeis.org

1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 2, 1, 14, 1, 16, 1, 2, 1, 20, 1, 2, 1, 24, 1, 26, 1, 2, 1, 4, 1, 2, 1, 5, 1, 36, 1, 2, 1, 40, 1, 2, 1, 5, 1, 12, 1, 2, 1, 9, 1, 2, 1, 54, 1, 56, 1, 2, 1, 5, 1, 2, 1, 4, 1, 66, 1, 2, 1, 5, 1, 2, 1, 74, 1, 23, 1, 2, 1, 6, 1, 2
Offset: 1

Views

Author

Michel Lagneau, Sep 14 2014

Keywords

Comments

a(n)=n if n^2+1 is prime and a(n)=1 if n is odd.
Conjecture: for all integer n, there exists at least an integer m <= n such that the smallest prime factor of n^2+1 is also the greatest prime factor of m^2+1. - Michel Lagneau, Sep 27 2015

Examples

			a(34)=5 because the greatest prime divisor of 5^2+1 = 2*13 is the smallest prime divisor of 34^2+1 =13*89.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=2000:T:=array(1..nn):U:=array(1..nn):
      for i from 1 to nn do:
        x:=factorset(i^2+1):T[i]:=x[1]:U[i]:=i:
      od:
        for n from 1 to 100 do:
         ii:=0:
          for k from 1 to 50000 while(ii=0) do:
           y:=factorset(k^2+1):n0:=nops(y):q:=y[n0]:
            if q=T[n]
             then
             ii:=1: printf(`%d, `,k):
             else
            fi:
         od:
       od:
  • Mathematica
    Table[k = 1; While[FactorInteger[k^2 + 1][[-1, 1]] != FactorInteger[n^2 + 1][[1, 1]], k++]; k, {n, 82}] (* Michael De Vlieger, Sep 27 2015 *)
  • PARI
    a(n) = {f = factor(n^2+1)[1,1]; k = 1; while (! ((g=factor(k^2+1)) && (g[#g~,1] == f)), k++); k;} \\ Michel Marcus, Sep 14 2014

A248511 Difference between k and the least prime factor of k^2+1 where k is the n-th number with k^2+1 composite.

Original entry on oeis.org

1, 3, 5, 3, 7, 9, 7, 11, 13, 15, 13, 17, 19, 17, 21, 23, 25, 23, 27, 13, 29, 27, 31, 21, 33, 35, 33, 37, 39, 37, 41, 31, 43, 17, 45, 43, 47, 9, 49, 47, 51, 53, 55, 53, 57, 47, 59, 57, 61, 47, 63, 65, 63, 67, 57, 69, 67, 71, 73, 23, 75, 73, 77, 43, 79, 77, 81
Offset: 1

Views

Author

Michel Lagneau, Oct 07 2014

Keywords

Comments

a(n) = A134407(n) - least prime divisor of A134406(n).

Examples

			a(1) = 1 because the first composite is 3^2+1 = 2*5 and 3-2 = 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
       for n from 1 to 200 do:
        p:=n^2+1:x:=factorset(p):d:=n-x[1]:
        if type(p,prime)=false
        then
        printf(`%d, `,d):
        else
        fi:
       od:

A248532 Numbers n such that the smallest prime divisor of n^2+1 is 53.

Original entry on oeis.org

76, 136, 454, 500, 560, 666, 924, 984, 1196, 1454, 1514, 1666, 1726, 2090, 2196, 2256, 2620, 2726, 2786, 3044, 3104, 3150, 3210, 3256, 3316, 3680, 3786, 4104, 4210, 4270, 4316, 4634, 4694, 4800, 4846, 5224, 5330, 5694, 5800, 5860, 5906, 5966, 6224, 6330, 6390
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2014

Keywords

Comments

Or numbers n such that the smallest prime divisor of n^2+1 is A002313(8).
a(n)== 30 or 76 (mod 106).

Examples

			76 is in the sequence because 76^2+1= 53*109.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..7000] | PrimeDivisors(n^2+1)[1] eq 53]; // Bruno Berselli, Oct 08 2014
  • Mathematica
    lst={};Do[If[FactorInteger[n^2+1][[1, 1]]==53, AppendTo[lst, n]], {n, 2, 2000}]; lst
    Select[Range[7000],FactorInteger[#^2+1][[1,1]]==53&] (* Harvey P. Dale, Aug 04 2016 *)
    p = 53; ps = Select[Range[p - 1], Mod[#, 4] != 3 && PrimeQ[#] &]; Select[Range[7000], Divisible[(nn = #^2 + 1), p] && ! Or @@ Divisible[nn, ps] &] (* Amiram Eldar, Aug 16 2019 *)

A248550 Numbers n such that the smallest prime divisor of n^2+1 is 73.

Original entry on oeis.org

100, 246, 484, 630, 776, 830, 976, 1506, 1706, 1944, 2144, 2236, 2290, 2874, 3020, 3604, 3696, 3750, 3896, 4134, 4426, 4626, 4864, 5064, 5210, 5356, 5594, 5740, 5794, 5940, 6086, 6324, 6470, 6616, 6670, 6816, 7200, 7254, 7346, 7400, 7546, 7930, 7984, 8076
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2014

Keywords

Comments

Or numbers n such that the smallest prime divisor of n^2+1 is A002313(10).
a(n) == 46 or 100 (mod 146).
No need to completely factorize n^2+1. - David A. Corneth, Apr 29 2017

Examples

			100 is in the sequence because 100^2+1= 73*137.
246 is in the sequence because 246^2+1 isn't divisible by any prime less than 73 and is divisible by 73. - _David A. Corneth_, Apr 29 2017
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[FactorInteger[n^2+1][[1, 1]]==73, AppendTo[lst, n]], {n, 2, 10000}]; lst
    Select[Range[8100],FactorInteger[#^2+1][[1,1]]==73&] (* Harvey P. Dale, Apr 29 2017 *)
    p = 73; ps = Select[Range[p - 1], Mod[#, 4] != 3 && PrimeQ[#] &]; Select[Range[8000], Divisible[(nn = #^2 + 1), p] && ! Or @@ Divisible[nn, ps] &] (* Amiram Eldar, Aug 16 2019 *)
  • PARI
    is(n) = {my(m=n%146, p=2, n21 = n^2+1, v=[5, 13, 17, 29, 37, 41, 53, 61]);
    return(abs(73-m)==27&&sum(i=1, #v, p=nextprime(p+1); valuation(n21,v[i]))==0)}
    upto(n) = {my(l=List(), i=54, m=46); while(mDavid A. Corneth, Apr 29 2017

A248551 Numbers n such that the smallest prime divisor of n^2+1 is 89.

Original entry on oeis.org

144, 390, 856, 1746, 1814, 1924, 2170, 2526, 2636, 2704, 2814, 3170, 3416, 3594, 3704, 3950, 4060, 4306, 4840, 4950, 5306, 5484, 6374, 6620, 6730, 7086, 7154, 7264, 7866, 7976, 8044, 8154, 8400, 8756, 8866, 9044, 9400, 9646, 9824, 10180, 10290, 11070, 11426
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2014

Keywords

Comments

Or numbers n such that the smallest prime divisor of n^2+1 is A002313(11).
a(n)== 34 or 144 (mod 178).

Examples

			144 is in the sequence because 144^2+1= 89*233.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[FactorInteger[n^2+1][[1, 1]]==89, AppendTo[lst, n]], {n, 2, 10000}]; lst
    p = 89; ps = Select[Range[p - 1], Mod[#, 4] != 3 && PrimeQ[#] &]; Select[Range[12000], Divisible[(nn = #^2 + 1), p] && ! Or @@ Divisible[nn, ps] &] (* Amiram Eldar, Aug 16 2019 *)

A248552 Numbers n such that the smallest prime divisor of n^2+1 is 97.

Original entry on oeis.org

366, 410, 604, 754, 1336, 1530, 1574, 2156, 2500, 2544, 2694, 3126, 3276, 3470, 3514, 3664, 4096, 4290, 4440, 5066, 5454, 5604, 6186, 6230, 6380, 6424, 6574, 7156, 8126, 8170, 8320, 9140, 9334, 9484, 9916, 10066, 10110, 10260, 10454, 11036, 11230, 11424, 11856
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2014

Keywords

Comments

Or numbers n such that the smallest prime divisor of n^2+1 is A002313(12).
a(n)== 22 or 172 (mod 194).

Examples

			366 is in the sequence because 366^2+1= 97*1381.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[FactorInteger[n^2+1][[1, 1]]==97, AppendTo[lst, n]], {n, 2, 10000}]; lst
    Select[Range[12000],FactorInteger[#^2+1][[1,1]]==97&] (* Harvey P. Dale, Aug 11 2017 *)
    p = 97; ps = Select[Range[p - 1], Mod[#, 4] != 3 && PrimeQ[#] &]; Select[Range[12000], Divisible[(nn = #^2 + 1), p] && ! Or @@ Divisible[nn, ps] &] (* Amiram Eldar, Aug 16 2019 *)

A249122 a(n) = floor(n / lpf(n^2 + 1)) where lpf(n^2 + 1) is the smallest prime divisor of n^2 + 1.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 1, 4, 0, 5, 2, 6, 0, 7, 0, 8, 3, 9, 0, 10, 4, 11, 0, 12, 0, 13, 5, 14, 1, 15, 6, 16, 2, 17, 0, 18, 7, 19, 0, 20, 8, 21, 3, 22, 1, 23, 9, 24, 1, 25, 10, 26, 0, 27, 0, 28, 11, 29, 4, 30, 12, 31, 3, 32, 0, 33, 13, 34, 5, 35, 14, 36, 0, 37, 1
Offset: 1

Views

Author

Michel Lagneau, Oct 21 2014

Keywords

Comments

a(n) = floor(n / A089120(n)).
a(A002496(n)) = 0 and a(A247340(n)) = 1 where A002496 are the primes of form m^2 + 1 and A247340(n) = {3, 8, 30, 46, 50, 76, ...} are the numbers m such that m^2 + 1 = p*q, p and q primes => p | a^2+1 and q | b^2+1 for some a,b < m.

Examples

			a(8) = 1 because 30^2 + 1 = 17*53 and floor(30/17) = 1.
Or a(8) = a(A247340(2)) = 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
       for n from 1 to 200 do:
        p:=n^2+1:x:=factorset(p):d:=floor(n/x[1]):
        printf(`%d, `, d):
       od:
  • Mathematica
    Table[Floor[n/ FactorInteger[n^2+1][[ 1, 1]]], {n, 100}]
  • PARI
    a(n) = n\factor(n^2+1)[1, 1]; \\ Michel Marcus, Oct 25 2014

A250028 a(n) is the number of positive integers k <= n such that lpf(k^2 + 1) = lpf(n^2 + 1), where lpf() is the least prime factor function.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 3, 7, 1, 8, 1, 9, 4, 10, 1, 11, 5, 12, 1, 13, 1, 14, 6, 15, 2, 16, 7, 17, 1, 18, 1, 19, 8, 20, 1, 21, 9, 22, 2, 23, 1, 24, 10, 25, 1, 26, 11, 27, 1, 28, 1, 29, 12, 30, 3, 31, 13, 32, 3, 33, 1, 34, 14, 35, 4, 36, 15, 37, 1, 38, 1
Offset: 1

Views

Author

Michel Lagneau, Nov 11 2014

Keywords

Comments

The least prime factor of n^2 + 1 is A089120(n).
a(2*j+1) = j+1 because 2 is the least prime factor of the even numbers.
a(n) = 1 if n is a term in A005574 (numbers n such that n^2 + 1 is prime).
a(n) = 1 if lpf(n^2 + 1) appears for the first time (example: a(50) = 1 because lpf(50^2 + 1) = lpf(41*61) = 41).
Property: if p = lpf(n^2 + 1), then p divides (n-p)^2 + 1.

Examples

			a(3) = 2 because the least prime factor of 3^2 + 1 is 2 and 2 is the 2nd positive integer k for which lpf(k^2 + 1) is 2 (the 1st occurrence is 1^2 + 1 = 2).
a(12) = 3 because the least prime factor of 12^2 + 1 = 5*29 is 5, and 5 is the 3rd occurrence (the 1st and 2nd are 2^2 + 1 = 5 and 8^2 + 1 = 5*13, respectively).
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=200:T:=array(1..nn):k:=0:
    for m from 1 to nn do:
    x:=factorset(m^2+1):n1:=nops(x):p:=x[1]:k:=k+1:T[k]:=p:
    od:
      for n from 1 to 150 do:
      q:=T[n]:ii:=0:
        for i from 1 to n do:
          if T[i]=q then ii:=ii+1:
          else
          fi:
        od:
        printf(`%d, `, ii):
      od:
  • Mathematica
    With[{s = Array[FactorInteger[#^2 + 1][[1, 1]] &, {76}]}, Reap[Do[Sow@ Count[Take[s, i], k_ /; k == FactorInteger[i^2 + 1][[1, 1]]], {i, Length@ s}]][[-1, 1]]] (* Michael De Vlieger, Sep 12 2017 *)
  • PARI
    a(n) = my(gn = vecmin(factor(n^2+1)[,1])); sum(k=1, n, vecmin(factor(k^2+1)[,1]) == gn); \\ Michel Marcus, Sep 11 2017

Extensions

Edited by Jon E. Schoenfield, Sep 11 2017
Previous Showing 11-20 of 23 results. Next