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.

A254734 a(n) is the least k > n such that n divides k^4.

This page as a plain text file.
%I A254734 #39 Sep 20 2024 17:12:18
%S A254734 2,4,6,6,10,12,14,10,12,20,22,18,26,28,30,18,34,24,38,30,42,44,46,30,
%T A254734 30,52,30,42,58,60,62,36,66,68,70,42,74,76,78,50,82,84,86,66,60,92,94,
%U A254734 54,56,60,102,78,106,60,110,70,114,116,118,90,122,124,84
%N A254734 a(n) is the least k > n such that n divides k^4.
%C A254734 A073353(n) <= a(n) <= 2*n. Any prime that divides n must also divide a(n), and because n divides (2*n)^4.
%C A254734 a(n) = 2*n iff n is squarefree (A005117). - _Robert Israel_, Feb 08 2015
%H A254734 Peter Kagey, <a href="/A254734/b254734.txt">Table of n, a(n) for n = 1..5000</a>
%e A254734 a(16) = 18 because 16 divides 18^4, but 16 does not divide 17^4.
%p A254734 f:= proc(n) local k;
%p A254734      for k from n+1 do if (k^4/n)::integer then return k fi od:
%p A254734 end proc:
%p A254734 seq(f(n), n=1..100); # _Robert Israel_, Feb 08 2015
%t A254734 lk[n_]:=Module[{k=n+1},While[PowerMod[k,4,n]!=0,k++];k]; Array[lk,70] (* _Harvey P. Dale_, Nov 22 2015 *)
%o A254734 (Ruby)
%o A254734 def a(n)
%o A254734   (n+1..2*n).find { |k| k**4 % n == 0 }
%o A254734 end
%o A254734 (PARI) a(n)=for(k=n+1,2*n,if(k^4%n==0,return(k)))
%o A254734 vector(100,n,a(n)) \\ _Derek Orr_ Feb 07 2015
%o A254734 (Python)
%o A254734 def A254734(n):
%o A254734     k = n + 1
%o A254734     while pow(k, 4, n):
%o A254734         k += 1
%o A254734     return k # _Chai Wah Wu_, Feb 15 2015
%Y A254734 Cf. A005117 (squarefree).
%Y A254734 Cf. A073353 (similar, with k^n).
%Y A254734 Cf. A254732 (similar, with k^2), A254733 (similar, with k^3).
%K A254734 nonn
%O A254734 1,1
%A A254734 _Peter Kagey_, Feb 07 2015