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.

Showing 1-10 of 12 results. Next

A372082 Primes p such that the 10's complement A089186(p) and the concatenations of p and A089186(p) and of A089186(p) and p are all prime.

Original entry on oeis.org

3, 7, 17, 29, 71, 83, 281, 719, 1637, 2309, 3701, 4493, 5507, 6299, 7691, 8363, 9029, 11003, 13163, 17117, 18371, 20807, 31181, 31793, 32693, 32843, 33617, 33893, 34211, 34673, 37277, 38453, 49409, 50591, 61547, 62723, 65327, 65789, 66107, 66383, 67157, 67307, 68207, 68819, 79193, 81629, 82883
Offset: 1

Views

Author

Robert Israel, Jul 03 2024

Keywords

Comments

If p is a term and starts with 1 to 8, then its 10's complement A089186(p) is also a term. This is not the case if p starts with 9, as then A089186(A089186(p)) <> p. For example, 9029 is a term but its 10's complement 971 is not a term.

Examples

			a(3) = 17 is a term because 17 is a prime, its 10's complement 83 is a prime, and the concatenations 1783 and 8317 are primes.
		

Crossrefs

Cf. A089186. Subset of A083989.

Programs

  • Maple
    filter:= proc(n) local d,c;
    if not isprime(n) then return false fi;
    d:= 10^(1+ilog10(n)); c:= d-n;
    isprime(c) and isprime(c*d+n) and isprime(n*10^(1+ilog10(c))+c)
    end proc:
    select(filter, [seq(i,i=3..10000,2)]);

A110396 10's complement factorial of n: a(n) = (10's complement of n)*(10's complement of n-1)*...*(10's complement of 2)*(10's complement of 1).

Original entry on oeis.org

1, 9, 72, 504, 3024, 15120, 60480, 181440, 362880, 362880, 32659200, 2906668800, 255786854400, 22253456332800, 1913797244620800, 162672765792768000, 13664512326592512000, 1134154523107178496000, 93000670894788636672000, 7533054342477879570432000
Offset: 0

Views

Author

Amarnath Murthy, Jul 29 2005

Keywords

Examples

			a(3) = (10-3)*(10-2)*(10-1) = 7*8*9 = 504.
		

Crossrefs

Programs

  • Maple
    s:=proc(m) nops(convert(m,base,10)) end: for q from 1 to 120 do c[q]:=10^s(q)-q od: a:=n->product(c[i],i=1..n): seq(a(n),n=0..20); # Emeric Deutsch, Jul 31 2005
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1,
           (10^length(n)-n)*a(n-1))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 22 2015
  • PARI
    a(n) = prod(i=1, n, 10^(1+logint(i, 10))-i); \\ Jinyuan Wang, Aug 09 2025
    
  • Python
    from functools import cache
    def a(n): return 1 if n == 0 else (10**len(str(n))-n)*a(n-1)
    print([a(n) for n in range(21)]) # Michael S. Branicky, Aug 13 2025

Formula

a(n) = Product_{i=1..n} c(i), where c(i) = A089186(i) is the difference between i and the next power of 10 (for example, c(13) = 100 - 13 = 87; c(100) = 1000 - 100 = 900). - Emeric Deutsch, Jul 31 2005

Extensions

More terms from Emeric Deutsch, Jul 31 2005
a(0)=1 prepended by Alois P. Heinz, Aug 13 2025

A068822 a(n) = gcd(n,c(n)), where c(n) is the 10's complement of n.

Original entry on oeis.org

1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 4, 1, 2, 5, 4, 1, 2, 1, 20, 1, 2, 1, 4, 25, 2, 1, 4, 1, 10, 1, 4, 1, 2, 5, 4, 1, 2, 1, 20, 1, 2, 1, 4, 5, 2, 1, 4, 1, 50, 1, 4, 1, 2, 5, 4, 1, 2, 1, 20, 1, 2, 1, 4, 5, 2, 1, 4, 1, 10, 1, 4, 1, 2, 25, 4, 1, 2, 1, 20, 1, 2
Offset: 1

Views

Author

Amarnath Murthy, Mar 08 2002

Keywords

Examples

			a(45) = 5 as 10's complement of 45 is 100-45 = 55 and (45,55) = 5.
		

Crossrefs

Programs

  • Maple
    a:=n-> igcd((10^length(n)-n), n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 22 2015
  • Mathematica
    GCD[#, 10^(IntegerLength[#]) - #] & /@ Range[82] (* Jayanta Basu, Aug 07 2013 *)

Formula

a(n) = gcd(n,A089186(n)) = gcd(n,A178914(n)). - Alois P. Heinz, Nov 05 2018

A083989 Concatenation of prime k and its 10's complement is a prime.

Original entry on oeis.org

3, 7, 17, 23, 29, 31, 41, 43, 53, 67, 71, 83, 109, 127, 139, 151, 173, 179, 197, 211, 229, 263, 271, 281, 307, 359, 463, 547, 557, 569, 587, 593, 673, 677, 683, 691, 701, 719, 727, 757, 769, 823, 839, 881, 883, 887, 907, 937, 983, 997, 1087, 1103, 1171, 1181
Offset: 1

Views

Author

Amarnath Murthy, May 23 2003

Keywords

Examples

			43 belongs to this sequence as 4357 is also a prime.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) local c; c:= 10^(1+ilog10(n))-n; n*10^(1+ilog10(c))+c end proc:
    select(t -> isprime(t) and isprime(g(t)), [seq(i,i=3..10000,2)]); # Robert Israel, Jul 03 2024

Extensions

More terms from Jason Earls, Jun 01 2003

A097327 Least positive integer m such that m*n has greater decimal digit length than n.

Original entry on oeis.org

10, 5, 4, 3, 2, 2, 2, 2, 2, 10, 10, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10
Offset: 1

Views

Author

Rick L. Shepherd, Aug 04 2004

Keywords

Comments

For any positive base B >= 2 the corresponding sequence contains only terms from 2 to B inclusive so the corresponding sequence for binary is all 2s (A007395).

Examples

			a(12) = 9 since 12 has two decimal digits and 9*12 = 108 has three (but 8*12 = 96 has only two).
		

Crossrefs

Cf. A089186 (analog for decimal m+n), A080079 (analog for binary m+n), A097326.
Cf. A055642.

Programs

  • Mathematica
    Table[Ceiling[10^IntegerLength[n]/n], {n, 100}] (* Paolo Xausa, Nov 02 2024 *)
  • PARI
    a(n) = my(m=1, sn=#Str(n)); while (#Str(m*n) <= sn, m++); m; \\ Michel Marcus, Oct 05 2021
  • Python
    def a(n): return (10**len(str(n))-1)//n + 1
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Oct 05 2021
    

Formula

a(n) = A097326(n) + 1.
a(n) = ceiling(10^A055642(n)/n). - Michael S. Branicky, Oct 05 2021

A087325 Numbers k such that k and its 10's complement both have the same prime signature.

Original entry on oeis.org

3, 5, 7, 11, 14, 15, 17, 26, 29, 30, 35, 38, 41, 47, 50, 53, 59, 62, 65, 70, 71, 74, 83, 85, 86, 89, 94, 97, 110, 111, 113, 122, 129, 132, 134, 137, 140, 150, 153, 158, 170, 173, 174, 179, 183, 185, 186, 187, 191, 195, 201, 206, 209, 212, 215, 219, 221, 227, 236
Offset: 1

Views

Author

Amarnath Murthy, Sep 04 2003

Keywords

Comments

Conjecture: (1) Sequence is infinite. (2) For every prime signature there corresponds a term in this sequence.
From Robert Israel, Jul 02 2024: (Start)
Conjecture (2) is false: k and its 10's complement can't both have prime signature p^m where m is even.
If k is a term, then so is 10 * k.
It appears that the first term with m prime factors, counted with multiplicity, is 3 * 10^((m-1)/2) if m is odd and 132 * 10^((m-4)/2) if m >= 4 is even. (End)

Examples

			35 is a member as 35= 5*7 and its 10's complement (100-35) = 65 = 13*5 both have the prime signature p*q.
35 is a member as 35 = 5*7 and its 10's complement (100-35) = 65 = 13*5 both have the prime signature p*q.
		

Crossrefs

Cf. A087324, A089186. Contains A068811.

Programs

  • Maple
    ps:= n -> sort(ifactors(n)[2][..,2]):
    tc:= n -> 10^(1+ilog10(n))-n:
    select(n -> ps(n) = ps(tc(n)), [$1..1000]); # Robert Israel, Jul 02 2024

Extensions

More terms from David Wasserman, May 06 2005

A109640 Indices of records in A109631.

Original entry on oeis.org

1, 2, 5, 11, 13, 19, 23, 31, 47, 97, 101, 113, 131, 151, 181, 227, 307, 457, 907, 1009, 1129, 1289, 1511, 1801, 2251, 3001, 4507, 9001, 10007, 11251, 12889, 15013, 18013, 22501, 30011, 45007, 90001, 100003, 112501, 128591, 150001, 180001, 225023, 300007, 450001
Offset: 1

Views

Author

Jason Earls, Aug 04 2005

Keywords

Comments

Previous name was: Values of k which are incrementally the largest values of the function: Smallest number m such that k divides (10's complement factorial of m).

Crossrefs

Programs

  • Maple
    A089186 := proc(n) 10^max(1,ilog10(n)+1)-n ; end: A110396 := proc(n) mul( A089186(i),i=1..n) ; end: A109631 := proc(n) local a; for a from 1 do if A110396(a) mod n = 0 then RETURN(a) ; fi ; od: end: A109640 := proc(n) option remember ; local nprev,aprev,a ; if n = 1 then RETURN(1); else nprev := A109640(n-1) ; aprev := A109631(nprev) ; for a from nprev+1 do if A109631(a) > aprev then RETURN(a) ; fi ; od; fi ; end: for n from 1 do printf("%d, ",A109640(n)) ; od: # R. J. Mathar, Feb 12 2008

Extensions

More terms from R. J. Mathar, Feb 12 2008
a(23)-a(45) from Jinyuan Wang, Aug 09 2025
New name (using comment from R. J. Mathar) from Joerg Arndt, Aug 09 2025

A178914 10's complement of nonnegative numbers.

Original entry on oeis.org

10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28
Offset: 0

Views

Author

Amarnath Murthy, Jun 23 2010

Keywords

Comments

Apart from the initial a(0) a duplicate of A089186. - R. J. Mathar, Jun 25 2010

Examples

			a(11) = 10's complement of 11 = 89
		

Crossrefs

Cf. A089186.

Programs

  • Mathematica
    Join[{10},Table[10^IntegerLength[n]-n,{n,80}]] (* Harvey P. Dale, Feb 06 2015 *)

Formula

a(n) = 10^k - n where k is the number of digits in n.

A279913 Largest n-digit number ending in n.

Original entry on oeis.org

1, 92, 993, 9994, 99995, 999996, 9999997, 99999998, 999999999, 9999999910, 99999999911, 999999999912, 9999999999913, 99999999999914, 999999999999915, 9999999999999916, 99999999999999917, 999999999999999918, 9999999999999999919, 99999999999999999920
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 22 2016

Keywords

Crossrefs

Cf. A266959.
Cf. A011557 (10^n), A089186.

Programs

  • Mathematica
    Table[n + 10^n - 10^(1 + Floor[Log10[n]]), {n, 100}] (* Wesley Ivan Hurt, Mar 30 2020 *)
  • PARI
    a(n) = 10^n + n - 10^(#Str(n)); \\ Michel Marcus, Jul 25 2022
  • Python
    def A279913(n): return 10**n+n-10**(len(str(n))) # Chai Wah Wu, Jul 25 2022
    

Formula

a(n) = n + 10^n - 10^(1 + floor(log_10(n))). - Wesley Ivan Hurt, Mar 30 2020
a(n) = 10^n - A089186(n). - Michel Marcus, Jul 25 2022

A039690 Ambitious numbers: numbers n with the property that if a number ends in n then it is divisible by n.

Original entry on oeis.org

1, 2, 5, 10, 20, 25, 50, 100, 125, 200, 250, 500, 1000, 1250, 2000, 2500, 5000, 10000, 12500, 20000, 25000, 50000, 100000, 125000, 200000, 250000, 500000, 1000000, 1250000, 2000000, 2500000, 5000000, 10000000, 12500000, 20000000, 25000000
Offset: 1

Views

Author

Keywords

Comments

Number whose 10's complement (A089186) is a multiple of it. 125 is a member as its 10's complement is 1000-125 = 875 = 125*7. - Amarnath Murthy, Mar 08 2002

Examples

			If a number ends in 2 then it is even and so is divisible by 2, so 2 is in the sequence.
		

References

  • P. J. Davis and R. Hersh, The Mathematical Experience, Birkhäuser, Boston and Basel, 1981; see pp. 293-298.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,0,10},{1,2,5,10,20,25,50,100,125},40] (* Harvey P. Dale, Sep 08 2018 *)

Formula

Consists of the numbers 1, 2, 5, 25 or 125 times a power of 10.
a(n) = 10*a(n-5). - Wesley Ivan Hurt, May 03 2023

Extensions

Entry revised by N. J. A. Sloane, Aug 03 2004
Showing 1-10 of 12 results. Next