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 31-40 of 46 results. Next

A217393 Smallest k > 0 such that 1 + n^2 and 1 + (n+k)^2 have the same largest factor, or 0 if no such k exists.

Original entry on oeis.org

0, 1, 4, 9, 3, 25, 0, 10, 23, 81, 39, 5, 8, 169, 83, 225, 24, 39, 143, 361, 17, 53, 7, 529, 263, 625, 19, 101, 363, 53, 12, 41, 43, 21, 543, 1225, 63, 9, 683, 1521, 29, 269, 25, 61, 923, 127, 221, 365, 1103, 22, 1199, 437, 175, 2809, 68, 3025, 182, 557, 1623, 157
Offset: 1

Views

Author

Michel Lagneau, Oct 02 2012

Keywords

Comments

Numbers k such that A014442(n) = A014442(n+k), otherwise 0.
A014442(n) is the largest prime factor of n^2 + 1.
a(n) = 0 when A014442(n) is the last possible largest prime, for instance a(1) = 0, a(7) = 0 whose corresponding largest primes are respectively 2 and 5. The general case for the numbers n such that a(n) = 0 is difficult.

Examples

			a(1) = 0 because A014442(1) = 2 is the unique largest prime of A014442(n);
a(2) = 1 because A014442(2) = 5 and A014442(2+1) = 5;
a(3) = 4 because A014442(3) = 5 and A014442(3+4) = 5;
a(4) = 9 because A014442(4) = 17 and A014442(4+17) = 17.
a(57) = 182 because A014442(57) = 13 and A014442(182+57) = 13.
		

Crossrefs

Cf. A014442.

Programs

  • Maple
    with(numtheory):T:=array(1..300): for n from 1 to 300 do:x:=factorset(n^2+1):n1:=nops(x): T[n] := x[n1]:od:for a from 1 to 60 do:p:=T[a]:ii:=0:for b from a to 10000 do: z:=factorset(b^2+1): n2:=nops(z):if z[n2]=p and ii=0 then b0:=b:ii:=1:else if z[n2]=p and ii=1 then b1:=b:printf(`%d, `,b1-b0):ii:=2:else fi:fi:od:if ii=1 then printf(`%d, `,0):else fi:od:

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

A240554 Square array of the greatest prime factor of n^k + 1, read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 2, 5, 2, 1, 5, 5, 3, 2, 1, 3, 17, 7, 17, 2, 1, 7, 13, 13, 41, 11, 2, 1, 2, 37, 7, 257, 61, 13, 2, 1, 3, 5, 31, 313, 41, 73, 43, 2, 1, 5, 13, 43, 1297, 521, 241, 547, 257, 2, 1, 11, 41, 19, 1201, 101, 601, 113, 193, 19, 2, 1, 3, 101, 73, 241
Offset: 1

Views

Author

T. D. Noe, Apr 07 2014

Keywords

Crossrefs

Cf. A003992 (n^k), A014442 (k=2), A081256 (k=3), A096172 (k=4).
Cf. A240548-A240553 (k=5 to 10).

Programs

  • Mathematica
    Table[FactorInteger[(n-k)^k + 1][[-1,1]], {n, 12}, {k, n}]

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

A248746 a(n) is the index k of the greatest prime divisor A002313(k) of n^2 + 1.

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 2, 3, 7, 13, 9, 5, 4, 22, 15, 26, 5, 3, 20, 39, 4, 12, 8, 51, 31, 60, 10, 18, 41, 8, 6, 7, 14, 11, 54, 105, 16, 4, 65, 121, 5, 35, 6, 17, 83, 10, 4, 45, 97, 9, 106, 48, 29, 209, 11, 221, 3, 59, 133, 28, 138, 66, 38, 25, 155, 294, 43, 6, 174, 5
Offset: 1

Views

Author

Michel Lagneau, Oct 13 2014

Keywords

Comments

a(n) is the number k such that A002313(k) = A014442(n).

Examples

			a(5)=3 because A002313(3)=13 and 5^2+1 = 2*13 with A002313(3)= A014442(5).
		

Crossrefs

Cf. A014442 (greatest prime divisor of n^2+1), A002313 (primes congruent to 1 or 2 modulo 4).
Cf. also A002522.

Programs

  • Maple
    with(numtheory):T:=array(1..50000):T[1]:=2:kk:=1:nn:=10^5:
    for i from 1 to nn do:
      p:=4*i+1:
      if type(p,prime)=true
      then
        kk:=kk+1:T[kk]:=p:
        else
        fi:
       od:
         for k from 1 to 5000 do:ii:=0:
          y:=factorset(k^2+1):n2:=nops(y):t:=y[n2]:
            for l from 1 to kk while(ii=0)do :
            if t=T[l]
             then
             printf(`%d, `,l):
             else
            fi:
         od:
        od:

A250069 a(n) = n^2 mod gpf(n^2 + 1) where gpf(k) is the greatest prime dividing k.

Original entry on oeis.org

1, 4, 4, 16, 12, 36, 4, 12, 40, 100, 60, 28, 16, 196, 112, 256, 28, 12, 180, 400, 16, 96, 52, 576, 312, 676, 72, 156, 420, 52, 36, 40, 108, 88, 612, 1296, 136, 16, 760, 1600, 28, 352, 36, 148, 1012, 72, 16, 460, 1200, 60, 1300, 540, 280, 2916, 88, 3136, 12
Offset: 1

Views

Author

Michel Lagneau, Nov 11 2014

Keywords

Comments

For n > 1, a(n) == 0 (mod 4).

Examples

			a(5)=12 because 5^2 mod A014442(5) = 25 mod 13 = 12.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 1 to 500 do:
       p:=n^2+1:x:=factorset(p):n0:=nops(x):r:=irem(n^2,x[n0]):
       printf(`%d, `, r):
      od:
  • Mathematica
    Table[Mod[n^2,FactorInteger[n^2+1,FactorComplete->True][[-1,1]]],{n,100}]
  • PARI
    a(n) = lift(Mod(n, vecmax(factor(n^2+1)[,1]))^2); \\ Michel Marcus, Sep 13 2017

Formula

a(n) = n^2 mod A014442(n) where A014442(n) is the greatest prime factor of n^2 + 1.

Extensions

Edited: exchanged name with an old comment. Old name as an alternative formula. Keyword easy added. - Wolfdieter Lang, Nov 29 2014
Redundancy in Name and in Formula section removed (at the suggestion of Michel Marcus) by Jon E. Schoenfield, Sep 13 2017

A252096 Largest prime divisor of n^2+1 - smallest prime divisor of n^2+1.

Original entry on oeis.org

0, 0, 3, 0, 11, 0, 3, 8, 39, 0, 59, 24, 15, 0, 111, 0, 27, 8, 179, 0, 15, 92, 51, 0, 311, 0, 71, 152, 419, 36, 35, 36, 107, 76, 611, 0, 135, 12, 759, 0, 27, 348, 35, 136, 1011, 44, 15, 456, 1199, 20, 1299, 536, 279, 0, 87, 0, 11, 668, 1739, 264, 1859, 764, 395
Offset: 1

Views

Author

Michel Lagneau, Dec 14 2014

Keywords

Examples

			a(5)= 11 because 5^2+1 = 2*13 and 13-2 = 11.
		

Crossrefs

Cf. A002522 (n^2+1), A005574 (n^2+1 is prime).
Cf. A014442 (largest prime factor of n2+1), A089120 (smallest prime factor).

Programs

  • Maple
    with(numtheory):
    a:= n-> (f-> max(f[])-min(f[]))(factorset(n^2+1)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 07 2015
  • Mathematica
    f[n_]:=Transpose[FactorInteger[n^2+1]][[1]]; Table[Last[f[n]-First[f[n]]], {n, 200}]
  • PARI
    a(n) = {my(f = factor(n^2+1)); f[#f~,1] - f[1,1];} \\ Michel Marcus, Dec 15 2014

Formula

a(n) = A014442(n) - A089120(n).
a(A005574(n)) = 0. - Michel Marcus, Dec 15 2014

A252890 Number of times the greatest prime factor of n^2 + 1 is a factor in all numbers <= n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 4, 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, 6, 1, 1, 4, 1, 3, 1, 1, 2, 7, 1, 1, 2, 1, 1, 1, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 6, 1, 3, 4, 1, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1
Offset: 1

Views

Author

Michel Lagneau, Dec 24 2014

Keywords

Comments

The greatest prime factor is counted with multiplicity (see the example).
a(n)=1 iff n^2 + 1 is prime.

Examples

			a(7)=4 because 7^2 + 1 = 50 and 5 is 4 times a factor:
2^2+1 = 5;
3^2+1 = 10 = 2*5;
7^2+1 = 50 = 2*5*5 (two times).
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(padic,ordp):
    f:= proc(n) local p ,q, n0;
      q:=factorset(n^2+1);n0:=nops(q);p:= q[n0];
      add(ordp(k^2+1, p), k=1..n);
    end proc:
    seq(f(n), n=1.. 100);
    # Using code from Robert Israel adapted for this sequence. See A078897.

A321069 Greatest prime factor of n^3+2.

Original entry on oeis.org

3, 5, 29, 11, 127, 109, 23, 257, 43, 167, 43, 173, 733, 1373, 307, 683, 983, 2917, 2287, 4001, 157, 71, 283, 223, 5209, 47, 127, 3659, 24391, 587, 9931, 113, 433, 6551, 809, 569, 307, 27437, 433, 10667, 439, 239, 1559, 223, 91127, 16223, 4153, 457, 39217, 62501
Offset: 1

Views

Author

Keywords

Crossrefs

Greatest prime factors of polynomials: A006530 (n), A076565 (2n+1), A076566 (3n+3), A076567 (4n+6), A164314 (n^2-2), A076605 (n^2-1), A014442 (n^2+1), A069902 (n^2+n), A074399 (n^2+n), A199423 (2n^2+n), A089619 (2n^2+2n+1), A037464 (4n^2-1), A253254 (9n^2-7n), A093074 (n^3-n), A081257 (n^3-1), A081256 (n^3+1), A321069(n^3+2), A281793 (n^3+n^2+n+1), A281793 (n^4-1), A096172 (n^4+1), A190136 (n^4 + 6n^3 + 11n^2 + 6n), A140538 (2n^4+1), A240548 (n^5+1), A281794 (n^5+n^3+n^2+1), A240549 (n^6+1), A240550 (n^7+1), A240551 (n^8+1), A240552 (n^9+1), A240553 (n^10+1).

Programs

  • Magma
    [Maximum(PrimeDivisors(n^3 + 2)): n in [1..60]]; // Vincenzo Librandi, Oct 27 2018
    
  • Mathematica
    Table[FactorInteger[n^3 + 2] [[-1, 1]], {n, 80}] (* Vincenzo Librandi, Oct 27 2018 *)
  • PARI
    a(n) = vecmax(factor(n^3+2)[,1]); \\ Michel Marcus, Oct 27 2018

A352290 Numbers m such that the greatest prime factor of m^2 + 1 is a Fibonacci number.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 18, 34, 55, 57, 89, 123, 144, 233, 239, 322, 377, 411, 500, 568, 610, 746, 788, 843, 987, 1487, 1542, 1568, 1636, 2207, 2584, 2707, 3173, 3639, 3793, 3804, 3817, 4050, 4181, 4217, 4594, 4662, 5270, 5778, 6107, 6613, 8595, 8972, 10341, 10569
Offset: 1

Views

Author

Michel Lagneau, Mar 11 2022

Keywords

Comments

A281618 is a subsequence.
The corresponding greatest prime Fibonacci factors of the sequence are 2, 5, 5, 13, 5, 13, 13, 89, 89, 13, 233, 89, 233, ...
The Fibonacci numbers of the sequence are 1, 2, 3, 5, 8, 34, 55, 89, 144, 233, 377, 610, 987, 2584, 4181, 10946, 17711, ... (subsequence of A000045).
The Lucas numbers of the sequence are 1, 2, 3, 7, 18, 123, 322, 843, 2207, 5778, 39603, 103682, ... (subsequence of A000032).
The prime numbers of the sequence are 2, 3, 5, 7, 89, 233, 239, 1487, 2207, 2707, 3793, 4217, 11789, 11981, 13763, ... including the prime Fibonacci numbers 2, 3, 5, 89, 233, 1066340417491710595814572169, ... (subsequence of A005478).

Examples

			18 is in the sequence because 18^2 + 1 = 5^2*13 and 13 is a Fibonacci number.
		

Crossrefs

Programs

  • Maple
    q:= n-> (t-> ormap(issqr, [t+4, t-4]))(5*max(numtheory[factorset](n^2+1))^2):
    select(q, [$1..12000])[];  # Alois P. Heinz, Mar 11 2022
  • Mathematica
    With[{f = Fibonacci[Range[21]], m = f[[-1]]}, Select[Range[m], MemberQ[f, FactorInteger[#^2 + 1][[-1, 1]]] &]] (* Amiram Eldar, Mar 11 2022 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
    isok(m) = isfib(vecmax(factor(m^2+1)[,1])); \\ Michel Marcus, Mar 11 2022
Previous Showing 31-40 of 46 results. Next