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.

A047232 Smallest k > n where n is a 4th power modulo k.

Original entry on oeis.org

1, 2, 7, 6, 6, 10, 10, 9, 14, 11, 15, 14, 22, 17, 22, 21, 17, 19, 21, 27, 22, 25, 26, 29, 29, 27, 37, 33, 31, 46, 34, 33, 46, 34, 37, 38, 38, 41, 43, 42, 41, 43, 47, 49, 49, 55, 49, 53, 52, 53, 62, 59, 54, 58, 57, 57, 61, 59, 61, 62, 66, 65, 67, 74, 66, 67, 75, 77, 76, 73, 74
Offset: 0

Views

Author

Henry Bottomley, Jun 08 2000

Keywords

Comments

a(n) = n+1 for n+1 in A192453. - Robert Israel, May 24 2019

Crossrefs

Cf. A192453.

Programs

  • Maple
    N:= 100: # for a(0)..a(N)
    V:= Array(0..N):
    count:= 1: V[0]:= 1:
    for k from 2 while count < N+1 do
      R:= select(t -> t <= N and V[t] = 0,{seq(x^4 mod k,x=1..k/2)});
      V[convert(R,list)]:= k;
      count:= count + nops(R);
    od:
    convert(V,list); # Robert Israel, May 24 2019
  • PARI
    a(n) = {my(k=n+1); while (!ispower(Mod(n,k), 4), k++); k;} \\ Michel Marcus, May 25 2019