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.

A373495 a(1) = 2; thereafter, a(n) = prime(n)^prime(n-1) (mod 10).

This page as a plain text file.
%I A373495 #32 Jul 14 2025 14:31:36
%S A373495 2,9,5,7,1,7,7,9,7,9,1,3,1,3,3,7,9,1,7,1,7,9,7,9,7,1,3,3,9,3,7,1,3,9,
%T A373495 9,1,3,3,3,7,9,1,1,7,7,9,1,7,3,9,3,9,1,1,3,3,9,1,3,1,3,7,7,1,7,7,1,3,
%U A373495 7,9,3,9,3,7,9,7,9,7,1,9,9,1,1,7,9,7,9,7,1,3,3,9,3,1,9,7,9,1,3,1,7,3,3,9,1
%N A373495 a(1) = 2; thereafter, a(n) = prime(n)^prime(n-1) (mod 10).
%C A373495 This sequence is not periodic.
%D A373495 Ilan Vardi, "Computational Recreations in Mathematica," Addison-Wesley Publishing, Redwood City, CA, 1991, p. 226-229.
%H A373495 Paolo Xausa, <a href="/A373495/b373495.txt">Table of n, a(n) for n = 1..10000</a>
%H A373495 Robert P. Munafo, <a href="https://mrob.com/pub/perl/hypercalc.html">Hypercalc - The Calculator That Doesn't Overflow</a>.
%H A373495 Robert P. Munafo, <a href="https://mrob.com/pub/seq/a092188.html">Sequence A092188, Smallest Positive Integer M such that 2^3^4^5^...^N = M mod N</a>.
%H A373495 Robert G. Wilson v, <a href="/A133612/a133612_2.txt">Mathematica coding for "SuperPowerMod" from Vardi</a>.
%H A373495 Wolfram cloud Function Repository, <a href="https://resources.wolframcloud.com/FunctionRepository/resources/PowerTowerMod">PowerTowerMod</a>.
%F A373495 a(n) = A078422(n-1) mod 10. - _R. J. Mathar_, Jul 14 2025
%e A373495 a(2) = 3^2 (mod 10) = 9.
%e A373495 a(3) = 5^3 (mod 10) = 5.
%t A373495 a[n_] := Switch[ Mod[ Prime[n], 10], 1, 1, 3, If[ Mod[ Prime[n -1], 4] == 1, 3, 7], 5, 5, 7, If[ Mod[ Prime[n -1], 4] == 1, 7, 3], 9, 9]; a[1] = 2; a[2] = 9; Array[a, 105]
%t A373495 Join[{2}, Map[PowerMod[#[[2]], #[[1]], 10] &, Partition[Prime[Range[100]], 2, 1]]] (* _Paolo Xausa_, Jul 14 2025 *)
%o A373495 (PARI) a(n) = if(n<2, 2, lift(Mod(prime(n),10)^prime(n-1))) \\ _Hugo Pfoertner_, Jul 07 2024
%Y A373495 Cf. A000040, A092188, A133612, A171881, A171882, A213013, A336111, A342176.
%K A373495 nonn
%O A373495 1,1
%A A373495 _Robert G. Wilson v_, Jun 06 2024