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.

A347112 a(n) = concat(prime(n+1),n) mod prime(n).

This page as a plain text file.
%I A347112 #14 Sep 14 2021 04:39:35
%S A347112 1,1,3,2,3,7,10,10,0,7,22,5,8,27,4,33,40,8,17,7,37,27,42,23,37,24,15,
%T A347112 14,102,74,50,108,96,61,86,32,9,112,138,121,62,137,52,58,48,52,192,2,
%U A347112 22,221,185,13,89,152,141,130,257,116,182,260,212,290,156,264
%N A347112 a(n) = concat(prime(n+1),n) mod prime(n).
%H A347112 Simon Strandgaard, <a href="/A347112/a347112.png">Plot of 10000 terms</a>
%e A347112 a(1) = concat( 3,1) mod  2 = 1,
%e A347112 a(2) = concat( 5,2) mod  3 = 1,
%e A347112 a(3) = concat( 7,3) mod  5 = 3,
%e A347112 a(4) = concat(11,4) mod  7 = 2,
%e A347112 a(5) = concat(13,5) mod 11 = 3.
%t A347112 Array[Mod[#3*10^(1 + Floor[Log10[#1]]) + #1, #2] & @@ {#, Prime[#], Prime[# + 1]} &, 64] (* _Michael De Vlieger_, Aug 18 2021 *)
%o A347112 (PARI) a(n) = eval(Str(prime(n+1),n)) % prime(n);
%o A347112 (Ruby) require 'prime'
%o A347112 values = []
%o A347112 primes = Prime.first(50)
%o A347112 primes.each_index do |n|
%o A347112   next if n < 1
%o A347112   values << (primes[n].to_s + n.to_s).to_i % primes[n-1]
%o A347112 end
%o A347112 p values
%o A347112 (Python)
%o A347112 from sympy import prime
%o A347112 def a(n): return int(str(prime(n+1)) + str(n))%prime(n)
%o A347112 print([a(n) for n in range(1, 65)]) # _Michael S. Branicky_, Aug 18 2021
%Y A347112 Cf. A000040, A075110.
%K A347112 nonn,base
%O A347112 1,3
%A A347112 _Simon Strandgaard_, Aug 18 2021