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 21-30 of 46 results. Next

A242012 a(n) is the number of positive integers k <= n for which gpf(k^2 + 1) = gpf(n^2 + 1), where gpf is the greatest prime divisor.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Aug 11 2014

Keywords

Comments

a(n) = 1 if n is a term in A005574 (numbers n such that n^2 + 1 is prime).
a(n) = 1 if gpf(k^2 + 1) <> gpf(n^2 + 1) for every positive integer k < n.

Examples

			a(3) = 2 because the greatest prime divisor of 3^2 + 1 is 5 and n=3 is the 2nd positive value of n at which gpf(n^2 + 1) = 5; the 1st is n=2: gpf(2^2 + 1) = 5.
a(313) = 7 because the greatest prime divisor of 313^2 + 1 is 101, and n=313 is the 7th positive value of n at which this occurs:
   10^2 + 1 = 101;
   91^2 + 1 = 2 * 41 * 101;
  111^2 + 1 = 2 * 61 * 101;
  192^2 + 1 = 5 * 73 * 101;
  212^2 + 1 = 5 * 89 * 101;
  293^2 + 1 = 2 * 5^2 * 17 * 101;
  313^2 + 1 = 2 * 5 * 97 * 101.
		

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[n1]: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:
    # Simpler version:
    N:= 1000:  # to get a(n) for n <= N
    T:= Array(1..N):
    for n from 1 to N do
    T[n]:= max(numtheory:-factorset(n^2+1));
      A[n]:= numboccur(T,T[n]);
    od:
    seq(A[n],n=1..N); # Robert Israel, Aug 12 2014
  • PARI
    a(n) = my(gn = vecmax(factor(n^2+1)[,1])); sum(k=1, n, vecmax(factor(k^2+1)[,1]) == gn); \\ Michel Marcus, Sep 10 2017

Extensions

Edited by Jon E. Schoenfield, Sep 10 2017

A248516 n^2+1 divided by its largest prime factor.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 10, 5, 2, 1, 2, 5, 10, 1, 2, 1, 10, 25, 2, 1, 26, 5, 10, 1, 2, 1, 10, 5, 2, 17, 26, 25, 10, 13, 2, 1, 10, 85, 2, 1, 58, 5, 50, 13, 2, 29, 130, 5, 2, 41, 2, 5, 10, 1, 34, 1, 250, 5, 2, 13, 2, 5, 10, 17, 2, 1, 10, 125, 2, 169, 2, 85, 130, 1, 58
Offset: 1

Views

Author

Michel Lagneau, Jun 18 2015

Keywords

Comments

a(n)=1 iff n^2+1 is prime (see A002496).
Conjecture: The Fibonacci numbers in the sequence are 1, 2, 5, 13, 34, 89, 233, 377, 610, 1597, 4181, 10946, 28657, 75025, 121393, 196418, ... including all of A001519.

Crossrefs

Programs

Formula

a(n) = A002522(n)/A014442(n).
a(n) = A052126(1+n^2). - R. J. Mathar, Jun 18 2015

A185002 Numbers k such that P(k^2+1) > P((k+1)^2+1) where P(n) (A006530) is the largest prime factor of n.

Original entry on oeis.org

4, 6, 10, 11, 12, 14, 16, 17, 20, 22, 24, 26, 29, 30, 33, 36, 37, 40, 42, 45, 46, 49, 51, 52, 54, 56, 59, 61, 62, 63, 66, 67, 69, 71, 72, 74, 79, 82, 84, 85, 88, 90, 92, 94, 95, 97, 98, 101, 102, 103, 104, 106, 108, 110, 113, 116, 118, 120, 121, 122, 124, 126
Offset: 1

Views

Author

Michel Lagneau, Jan 23 2012

Keywords

Examples

			11 is in the sequence because 11^2+1 = 2*61 and 12^2+1 = 5*29 => 61 > 29.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=FactorInteger[n^2+1][[-1,1]];Select[Range[125],f[#]>f[#+1]&]
  • PARI
    r=2;for(k=1,1e3,t=factor((k+1)^2+1)[,1];t=t[#t];if(tCharles R Greathouse IV, Jan 23 2012

A209877 a(n) = A209874(n)/2: Least m > 0 such that 4*m^2 = -1 modulo the Pythagorean prime A002144(n).

Original entry on oeis.org

1, 4, 2, 6, 3, 16, 15, 25, 23, 17, 11, 5, 38, 49, 50, 22, 14, 40, 81, 56, 7, 61, 72, 32, 8, 41, 30, 114, 69, 144, 57, 74, 68, 21, 52, 137, 167, 10, 133, 196, 127, 191, 174, 24, 104, 143, 26, 59, 43, 12, 258, 238, 289, 97, 77, 252, 53, 29, 13, 283, 48, 190, 335, 361, 31, 228, 291, 159, 263, 123, 260, 325, 363, 247, 162
Offset: 1

Views

Author

M. F. Hasler, Mar 14 2012

Keywords

Comments

Also: Square root of -1/4 in Z/pZ, for Pythagorean primes p=A002144(n).
Also: Least m>0 such that the Pythagorean prime p=A002144(n) divides 4(kp +/- m)^2+1 for all k>=0.
In practice these can also be determined by searching the least N^2+1 whose least prime factor is p=A002144(n): For given p, all of these N will have a(n) or p-a(n) as remainder mod 2p.

Examples

			a(1)=1 since A002144(1)=5 and 4*1^2+1 is divisible by 5; as a consequence 4*(5k+/-1)^2+1 = 100k^2 +/- 40k + 5 is divisible by 5 for all k.
a(2)=4 since A002144(2)=13 and 4*4^2+1 = 65 is divisible by 13, while 4*1^1+1=5, 4*2^2+1=17 and 4*3^2+1=37 are not. As a consequence, 4*(13k+/-4)^2+1 = 13(...)+4*4^1+1 is divisible by 13 for all k.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local m;
       if not isprime(p) then return NULL fi;
       m:= numtheory:-msqrt(-1/4, p);
       min(m,p-m);
    end proc:
    map(f, [seq(i,i=5..1000,4)]); # Robert Israel, Mar 13 2018
  • Mathematica
    f[p_] := Module[{r}, r /. Solve[4 r^2 == -1, r, Modulus -> p] // Min];
    f /@ Select[4 Range[300] + 1, PrimeQ] (* Jean-François Alcover, Jul 27 2020 *)
  • PARI
    apply(p->lift(sqrt(Mod(-1,p)/4)), A002144)

A281661 The least common multiple of 1 + n^2 and 1 + n^3.

Original entry on oeis.org

1, 2, 45, 140, 1105, 1638, 8029, 8600, 33345, 29930, 101101, 81252, 250705, 186830, 540765, 381488, 1052929, 712530, 1895725, 1241660, 3208401, 2046902, 5164765, 3224520, 7977025, 4890938, 11899629, 7184660, 17233105, 10268190, 24327901, 14329952, 33588225, 19586210
Offset: 0

Views

Author

R. J. Mathar, Jan 26 2017

Keywords

Comments

If d|(1 + n^2) and d|(1 + n^3), then d|((1 + n^2) - (n*(1 + n^2) - (1 + n^3))^2) = 2*n. If k|n and k|(1 + n^2), then k = 1 is only option since k|n^2 and k|(1 + n^2). So d must be 1 or 2, exactly. Obviously if n is odd, then the greatest d must be 2 since 1 + n^2 and 1 + n^3 are even. If n is even, then d must be 1 since 1 + n^2 and 1 + n^3 are odd.

Crossrefs

Programs

  • Maple
    A281661 := proc(n)
            ilcm(1+n^2,1+n^3);
    end proc:
  • Mathematica
    Table[LCM[n^2+1,n^3+1],{n,0,50}] (* Harvey P. Dale, Jun 10 2023 *)
  • PARI
    a(n) = lcm(n^2+1, n^3+1); \\ Michel Marcus, Jan 29 2017
    
  • PARI
    a(n) = (n^2 + 1)*(n^3 + 1)/(1 + n%2); \\ Altug Alkan, Jan 29 2017

Formula

a(n) = lcm(1+n^2, 1+n^3) = (1+n^2)*(1+n^3)/gcd(1+n^2, 1+n^3).
a(n) = (1+n^2)*(1+n^3)/ A000034(n) with g.f. ( 1 +2*x +39*x^2 +128*x^3 +850*x^4 +828*x^5 +2054*x^6 +832*x^7 +861*x^8 +130*x^9 +35*x^10 ) / ( (x-1)^6 *(1+x)^6 ).
A006530(a(n)) = max( A081256(n), A014442(n)). - R. J. Mathar, Jan 28 2017
a(n) = (3 + (-1)^n)*(1 + n^2 + n^3 + n^5)/4. - Colin Barker, Feb 07 2017

A281793 The largest prime factor of (1+n)*(1+n^2).

Original entry on oeis.org

1, 2, 5, 5, 17, 13, 37, 5, 13, 41, 101, 61, 29, 17, 197, 113, 257, 29, 19, 181, 401, 17, 97, 53, 577, 313, 677, 73, 157, 421, 53, 37, 41, 109, 89, 613, 1297, 137, 17, 761, 1601, 29, 353, 37, 149, 1013, 73, 17, 461, 1201, 61, 1301, 541, 281, 2917, 89, 3137, 29
Offset: 0

Views

Author

R. J. Mathar, Jan 30 2017

Keywords

Crossrefs

Programs

  • Magma
    [#f eq 0 select 1 else f[ #f][1] where f is Factorization((1+n)*(1+n^2)): n in [0..60]]; // Vincenzo Librandi, Jun 03 2017
    
  • Maple
    A281793 := proc(n)
        A006530((1+n)*(1+n^2)) ;
    end proc:
    seq(A281793(n),n=0..60) ;
  • Mathematica
    Table[Max[Transpose[FactorInteger[(1 + n) (1 + n^2)]][[1]]], {n, 0, 60}] (* Vincenzo Librandi, Jun 03 2017 *)
  • PARI
    a(n) = if (n==0, 1, my(f=factor((1+n)*(1+n^2))); vecmax(f[, 1])); \\ Michel Marcus, Jun 03 2017; corrected Jun 13 2022

Formula

a(n) = max( A006530(n+1), A014442(n)).
a(n) = A006530(A281660(n)).

A281794 The largest prime factor of (1+n^2)*(1+n^3).

Original entry on oeis.org

1, 2, 5, 7, 17, 13, 37, 43, 19, 73, 101, 61, 29, 157, 197, 211, 257, 29, 307, 181, 401, 421, 463, 53, 577, 601, 677, 73, 757, 421, 67, 37, 331, 151, 1123, 613, 1297, 137, 67, 1483, 1601, 547, 1723, 139, 631, 1013, 109, 103, 461, 1201, 61, 2551, 541, 919
Offset: 0

Views

Author

R. J. Mathar, Jan 30 2017

Keywords

Crossrefs

Programs

  • Magma
    [#f eq 0 select 1 else f[ #f][1] where f is Factorization((1+n^2)*(1+n^3)): n in [0..60]]; // Vincenzo Librandi, Jun 03 2017
    
  • Maple
    A281794 := proc(n)
        A006530((1+n^2)*(1+n^3)) ;
    end proc:
    seq(A281794(n),n=0..60) ;
  • Mathematica
    Table[Max[Transpose[FactorInteger[(1 + n^2) (1 + n^3)]][[1]]], {n, 0, 60}] (* Vincenzo Librandi, Jun 03 2017 *)
  • PARI
    a(n) = if (n==0, 1, my(f=factor((1+n^2)*(1+n^3))); vecmax(f[, 1])); \\ Michel Marcus, Jun 03 2017; corrected Jun 13 2022

Formula

a(n) = max( A014442(n), A081256(n)).
a(n) = A006530(A281661(n)).

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

A200072 Numbers k such that the sum of the prime distinct divisors of k^2+1 equals 2 times the largest prime divisor of k^2+1.

Original entry on oeis.org

1123, 1143, 6235, 8457, 11565, 21917, 22857, 33285, 41319, 58195, 119571, 124723, 128363, 173922, 178703, 188115, 243939, 280158, 308859, 309709, 409485, 430581, 565571, 703845, 961237, 1153362, 1170291, 1327998, 1409794, 1536651, 1586195, 1649395, 1665868
Offset: 1

Views

Author

Michel Lagneau, Nov 13 2011

Keywords

Examples

			1123 is in the sequence because the distinct prime divisors of 1123^2 + 1 are 2, 5, 13, 89, 109 and the sum 2 + 5 + 13 + 89 + 109 = 218 = 2*109.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1700000],Plus@@(pl=First/@FactorInteger[#^2+1])==2*pl[[-1]]&]

A212710 Smallest number k such that the difference between the greatest prime divisor of k^2+1 and the sum of the other prime distinct divisors equals n.

Original entry on oeis.org

411, 1, 3, 447, 2, 57, 212, 8, 307, 13, 5, 38, 319, 99, 3310, 70, 4, 242, 132, 50, 73, 17, 192, 12, 133, 3532, 41, 22231, 999, 43, 172, 68, 83, 11878, 294, 30, 6, 111, 9, 776, 2059, 922, 818, 46, 1183, 23, 216, 182, 557, 2010, 1818, 3323, 945, 512, 568, 76
Offset: 1

Views

Author

Michel Lagneau, May 24 2012

Keywords

Examples

			a(1) = 411 because 411^2+1 = 2 * 13 * 73 * 89  and 89 - (2 + 13 + 73) = 89 - 88 = 1.
		

Crossrefs

Programs

  • Maple
    A212710 := proc(n)
        local fs,gpf,opf,k ;
        for k from 1 do
            fs := numtheory[factorset](k^2+1) ;
            gpf := max(op(fs)) ;
            opf := add( f,f=fs)-gpf ;
            if gpf-opf = n then
                return k;
            end if;
        end do:
    end proc:
    seq(A212710(n),n=1..50) ; # R. J. Mathar, Nov 14 2014
  • Mathematica
    lst={};Do[k=1;[While[!2*FactorInteger[k^2+1][[-1,1]]-Total[Transpose[FactorInteger[k^2+1]][[1]]]==n,k++]];AppendTo[lst,k],{n,0,60}];lst (* Michel Lagneau, Oct 28 2014 *)
  • PARI
    a(n) = {k = 1; ok = 0; while (!ok, f = factor(k^2+1); nbp = #f~; ok = (f[nbp, 1] - sum(i=1, nbp-1, f[i,1]) == n); if (!ok, k++);); k;} \\ Michel Marcus, Nov 09 2014
Previous Showing 21-30 of 46 results. Next