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.

A095208 n if n is composite else 10*n.

This page as a plain text file.
%I A095208 #16 Jun 08 2015 13:33:39
%S A095208 10,20,30,4,50,6,70,8,9,10,110,12,130,14,15,16,170,18,190,20,21,22,
%T A095208 230,24,25,26,27,28,290,30,310,32,33,34,35,36,370,38,39,40,410,42,430,
%U A095208 44,45,46,470,48,49,50,51,52,530,54,55,56,57
%N A095208 n if n is composite else 10*n.
%C A095208 In base 10 the smallest composite number starting with the same digits as n.
%C A095208 The average of the first n terms is n/2 + 9n/(2 log n) + O(n log log n/log^2 n). - _Charles R Greathouse IV_, Jun 08 2015
%e A095208 4 is composite, therefore a(4) = 4. 5 is prime, hence a(5) = 50.
%t A095208 f[n_] := If[PrimeQ[n] || n == 1, 10 n, n]; Array[f, 57] (* _Robert G. Wilson v_, Jul 05 2011 *)
%t A095208 Array[If[CompositeQ[#],#,10#]&,60] (* _Harvey P. Dale_, Jan 24 2015 *)
%o A095208 (PARI) a(n)=if(isprime(n),10*n,if(n>1,n,10)) \\ _Charles R Greathouse IV_, Jun 08 2015
%Y A095208 Cf. A018800.
%K A095208 easy,less,nonn
%O A095208 1,1
%A A095208 _Amarnath Murthy_, Jun 07 2004
%E A095208 Edited and extended by _Stefan Steinerberger_, Jun 15 2007
%E A095208 Edited by _Arkadiusz Wesolowski_, Jul 05 2011