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.

A130891 a(n) = n if n is not an odd prime number. Otherwise, a(n) = k*floor(n/10), where k is the smallest integer such that n < 10^k.

This page as a plain text file.
%I A130891 #15 Mar 31 2025 13:42:21
%S A130891 0,1,2,0,4,0,6,0,8,9,10,2,12,2,14,15,16,2,18,2,20,21,22,4,24,25,26,27,
%T A130891 28,4,30,6,32,33,34,35,36,6,38,39,40,8,42,8,44,45,46,8,48,49,50,51,52,
%U A130891 10,54,55,56,57,58,10,60,12,62,63,64,65,66,12,68
%N A130891 a(n) = n if n is not an odd prime number. Otherwise, a(n) = k*floor(n/10), where k is the smallest integer such that n < 10^k.
%H A130891 Harvey P. Dale, <a href="/A130891/b130891.txt">Table of n, a(n) for n = 0..1000</a>
%p A130891 f:= proc(n) local k;
%p A130891   if n::odd and isprime(n) then
%p A130891     k:= ilog10(n)+1;
%p A130891     k*floor(n/10)
%p A130891   else n
%p A130891   fi
%p A130891 end proc:
%p A130891 map(f, [$0..100]); # _Robert Israel_, Aug 04 2019
%t A130891 Table[If[n>2&&PrimeQ[n],IntegerLength[n]Floor[n/10],n],{n,0,70}] (* _Harvey P. Dale_, Mar 31 2025 *)
%Y A130891 Cf. A131516, A130758, A000027, A001477, A006005.
%K A130891 nonn
%O A130891 0,3
%A A130891 _Mohammad K. Azarian_, Aug 21 2007
%E A130891 Offset changed by _Mohammad K. Azarian_, Nov 19 2008
%E A130891 Offset corrected by _Robert Israel_, Aug 04 2019