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.

A358348 Numbers k such that k == k^k (mod 9).

This page as a plain text file.
%I A358348 #48 Mar 29 2023 06:37:36
%S A358348 1,4,7,9,10,13,16,17,18,19,22,25,27,28,31,34,35,36,37,40,43,45,46,49,
%T A358348 52,53,54,55,58,61,63,64,67,70,71,72,73,76,79,81,82,85,88,89,90,91,94,
%U A358348 97,99,100,103,106,107,108,109,112,115,117,118,121,124,125,126
%N A358348 Numbers k such that k == k^k (mod 9).
%C A358348 Each multiple of 9 is in the sequence. Additionally, the squares are also present.
%D A358348 M. Fujiwara and Y. Ogawa, Introduction to Truly Beautiful Mathematics. Tokyo: Chikuma Shobo, 2005.
%H A358348 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,1,-1).
%F A358348 G.f.: x*(x+1)*(x^7+3*x^5+x^3+x^2+2*x+1)/((1-x)^2*(1+x^3+x^6)*(1+x+x^2)). - _Alois P. Heinz_, Feb 08 2023
%F A358348 a(n) = 2*(n+1) - b(n) where b(n>=0) = 2,3,2,1,1,2,1,0,1,2,3,2,... has period 9. - _Kevin Ryde_, Mar 26 2023
%e A358348 4 is a term since 4^4 = 256 == 4 (mod 9).
%p A358348 A358348 := proc(n)
%p A358348     2*(n+1)-op(modp(n,9)+1,[2,3,2,1,1,2,1,0,1]) ;
%p A358348 end proc:
%p A358348 seq(A358348(n),n=1..50) ; # _R. J. Mathar_, Mar 29 2023
%t A358348 Select[Range[130], MemberQ[{0, 1, 4, 7, 9, 10, 13, 16, 17}, Mod[#, 18]] &] (* _Amiram Eldar_, Nov 12 2022 *)
%o A358348 (PARI) isok(k) = k == Mod(k,9)^k; \\ _Michel Marcus_, Nov 22 2022
%o A358348 (Python)
%o A358348 def A358348(n):
%o A358348     return ((0, 1, 4, 7, 9, 10, 13, 16, 17)[m := n % 9]
%o A358348          + (n - m << 1))  # _Chai Wah Wu_, Feb 09 2023
%Y A358348 Cf. A007953, A010888, A082576, A189510.
%K A358348 nonn,base,easy
%O A358348 1,2
%A A358348 _Ivan Stoykov_, Nov 11 2022