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.

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