login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A095208 n if n is composite else 10*n. 0
10, 20, 30, 4, 50, 6, 70, 8, 9, 10, 110, 12, 130, 14, 15, 16, 170, 18, 190, 20, 21, 22, 230, 24, 25, 26, 27, 28, 290, 30, 310, 32, 33, 34, 35, 36, 370, 38, 39, 40, 410, 42, 430, 44, 45, 46, 470, 48, 49, 50, 51, 52, 530, 54, 55, 56, 57 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
In base 10 the smallest composite number starting with the same digits as n.
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
LINKS
EXAMPLE
4 is composite, therefore a(4) = 4. 5 is prime, hence a(5) = 50.
MATHEMATICA
f[n_] := If[PrimeQ[n] || n == 1, 10 n, n]; Array[f, 57] (* Robert G. Wilson v, Jul 05 2011 *)
Array[If[CompositeQ[#], #, 10#]&, 60] (* Harvey P. Dale, Jan 24 2015 *)
PROG
(PARI) a(n)=if(isprime(n), 10*n, if(n>1, n, 10)) \\ Charles R Greathouse IV, Jun 08 2015
CROSSREFS
Cf. A018800.
Sequence in context: A242964 A063117 A157938 * A291625 A172260 A300024
KEYWORD
easy,less,nonn
AUTHOR
Amarnath Murthy, Jun 07 2004
EXTENSIONS
Edited and extended by Stefan Steinerberger, Jun 15 2007
Edited by Arkadiusz Wesolowski, Jul 05 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:04 EDT 2024. Contains 371906 sequences. (Running on oeis4.)