The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A228628 9's complement of prime(n). 3
 7, 6, 4, 2, 88, 86, 82, 80, 76, 70, 68, 62, 58, 56, 52, 46, 40, 38, 32, 28, 26, 20, 16, 10, 2, 898, 896, 892, 890, 886, 872, 868, 862, 860, 850, 848, 842, 836, 832, 826, 820, 818, 808, 806, 802, 800, 788, 776, 772, 770, 766, 760, 758, 748, 742, 736, 730, 728 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS a(n) = 10^k - 1 - prime(n) where k is the number of digits in prime(n). If d is d digit in prime(n) replace it with 9 - d. LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 FORMULA a(n) = A061601(A000040(n)). - Charles R Greathouse IV, Aug 29 2013 a(n) = A160668(n) - 1. Alois P. Heinz, Dec 08 2017 EXAMPLE a(6) = 86 because prime(6) = 13 and 9 - 1 = 8, 9 - 6 = 3. MAPLE a:= n-> (p-> 10^length(p)-p-1)(ithprime(n)): seq(a(n), n=1..100); # Alois P. Heinz, Dec 08 2017 MATHEMATICA nineComplement[n_] := FromDigits[Table[9, {Length[IntegerDigits[Prime[n]]]}] - IntegerDigits[Prime[n]]]; Table[nineComplement[n], {n, 1, 71}] PROG (PARI) a(n)=my(p=prime(n)); 10^#Str(p)-p-1 \\ Charles R Greathouse IV, Aug 29 2013 (Python) from sympy import primerange def nc(n): return 10**len(str(n)) - 1 - n def auptop(limit): return [nc(p) for p in primerange(1, limit+1)] print(auptop(271)) # Michael S. Branicky, Jul 06 2021 CROSSREFS Cf. A000040, A061601, A160668. Sequence in context: A021933 A154730 A242967 * A131266 A258094 A258008 Adjacent sequences: A228625 A228626 A228627 * A228629 A228630 A228631 KEYWORD nonn,base,easy AUTHOR Michel Lagneau, Aug 28 2013 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.

Last modified May 30 03:30 EDT 2024. Contains 372957 sequences. (Running on oeis4.)