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.

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: