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 13 results. Next

A214927 Number of n-digit numbers N that do not end with 0 and are such that the reversal of N divides N but is different from N.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 2, 4, 4, 6, 6, 10, 10, 16, 16, 26, 26, 42, 42, 68, 68, 110, 110, 178, 178, 288, 288, 466, 466, 754, 754, 1220, 1220, 1974, 1974, 3194, 3194, 5168, 5168, 8362, 8362, 13530, 13530, 21892, 21892, 35422, 35422, 57314, 57314, 92736, 92736, 150050, 150050, 242786, 242786, 392836, 392836, 635622, 635622
Offset: 1

Views

Author

Gregory A. Rosenthal, Mar 10 2013

Keywords

Comments

For the actual numbers, see A031877 and their reversals in A008919. See especially the comments in A008919.

Examples

			The smallest examples of such numbers are 8712 and 9801 (so a(n)=0 for n < 4, a(4) = 2); 87912 and 98901 (so a(5) = 2); and 879912 and 989901 (so a(6) = 2).
		

References

  • W. W. R. Ball and H. S. M. Coxeter. Mathematical Recreations and Essays, Macmillan, New York, 1939, page 13; Dover, New York, 13th ed. 1987, pp. 14-15.
  • H. Camous, Jouer Avec Les Maths, "Cardinaux Réversibles", Section I, Problem 6, pp. 27, 37-38; Les Editions D'Organisation, Paris, 1984.
  • Heinrich Dörrie, Mathematische Miniaturen, Ferdinand Hirt, Breslau, Germany, 1943; see pages 337-339.
  • M. Gardner, Mathematical Magic Show, Vintage Books, 1978, pp. 203, 204, 211, 212.
  • C. A. Grimm and D. W. Ballew, Reversible multiples, J. Rec. Math. 8 (1975-1976), 89-91.
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, London, 1986, Entry 1089.

Crossrefs

Programs

  • Magma
    [0] cat [2*Fibonacci(Floor((n-2)/2)): n in [2..60]]; // Vincenzo Librandi, Jun 18 2013
    
  • Mathematica
    Join[{0}, Table[2 Fibonacci[Floor[(n-2)/2]], {n, 2, 60}]] (* Vincenzo Librandi, Jun 18 2013 *)
  • SageMath
    def A214927(n): return 2*(fibonacci((n-2)//2) -int(n==1))
    [A214927(n) for n in range(1,71)] # G. C. Greubel, Oct 23 2024

Formula

a(n) = 2*Fibonacci(floor((n-2)/2)) = 2*A103609(n-2), for n > 1.
G.f.: 2*x^4*(1+x) / (1-x^2-x^4). - Colin Barker, Dec 31 2013

Extensions

Formula, more terms and additional references and links from N. J. A. Sloane, Mar 11 2013

A001232 Numbers k such that 9*k = (k written backwards), k > 0.

Original entry on oeis.org

1089, 10989, 109989, 1099989, 10891089, 10999989, 108901089, 109999989, 1089001089, 1098910989, 1099999989, 10890001089, 10989010989, 10999999989, 108900001089, 108910891089, 109890010989, 109989109989, 109999999989, 1089000001089, 1089109891089
Offset: 1

Views

Author

Keywords

Comments

This sequence contains the least n-digit non-palindromic number which is a factor of its reversal. Quotient is always 9. - Lekraj Beedassy, Jun 11 2004. (But it contains many other numbers as well. - N. J. A. Sloane, Jul 02 2013)
Nonzero fixed points of the map which sends x to x - reverse(x) if that is nonnegative, otherwise to x + reverse(x). - Sébastien Dumortier, Nov 05 2006. (Clarified comment, see A124074. - Ray Chandler, Oct 11 2017)
Numbers k such that reversal(k)=reversal(k+reversal(k)). Also numbers k such that reversal(k)=reversal(10*k-reversal(k)). - Farideh Firoozbakht, Jun 11 2010
From M. F. Hasler, Oct 04 2022: (Start)
(1) The first digit of any term must be 1, otherwise multiplication by 9 yields one more digit. For the same reason, no "overflow" must occur from the second to the first digit, so the last digit must be 9.
(2) Continuing the reasoning "from right to left" implies that the trailing nonzero digits must be ...9*89, where 9* means any nonnegative number of consecutive digits 9, preceded by a digit 0, which must be preceded by a digit 1. This implies that the initial and also final digits of any term must be 109*89. We might call a term of this form a "primitive" term. So there is exactly one primitive term b(k) = 11*10^(k-2)-11 with k digits, for all k >= 4.
(3) All terms of the sequence are a "symmetric" concatenation of such b(k)'s, "spaced out" with any number of digits 0, also in a symmetrical way: For any n >= 1, let k = (k[1], ..., k[n]) with k[n+1-j] = k[j] >= 4, and m = (m[1], ..., m[n-1]) (possibly of length 0) with m[n-j] = m[j] >= 0, then N = concat(b(k[j])*10^m[j], 1 <= j < n; k[n]) is a term of the sequence, and this yields all terms of the sequence. (For example, with 1089 we also have 1089{0...0}1089 and 1089,001089,001089, etc.) (End)

Examples

			1089*9 = 9801.
		

References

  • H. Camous, Jouer Avec Les Maths, "Cardinaux Réversibles", Section I, Problem 6, pp. 27, 37-38; Les Editions d'Organisation, Paris, 1984.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 41.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, under #1089.

Crossrefs

Programs

  • Mathematica
    Rest@Select[FromDigits /@ Tuples[{0, 99}, 11], IntegerDigits[9*#] == Reverse@IntegerDigits[#] &] (* Arkadiusz Wesolowski, Aug 14 2012 *)
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; 99#&/@Flatten[Table[ FromDigits/@ Select[Tuples[{0,1},n],okQ],{n,20}]] (* Harvey P. Dale, Jul 03 2013 *)
  • PARI
    isok(n) = 9*n == eval(concat(Vecrev(Str(n)))); \\ Michel Marcus, Feb 21 2015
    
  • PARI
    {A001232_row(n, L(v, s=0)=for(i=1, #v, s*=10^v[i]; i%2 && s+=10^v[i]\900); s)=if(n<4, [], L, Set(apply(L, self()(n, 0)))*99, L=List([[n]]); for(k=4, n\2, listput(L,[k,n-2*k,k]); for(p=0, n\2-k, foreach(self()(n-(k+p)*2, 0), M, listput(L, concat([[k, p], M, [p, k]]))))); L)} \\ List of n-digit terms. - M. F. Hasler, Oct 04 2022
    concat(apply(A001232_row, [1..14]))
    
  • Python
    def A001232_row(n, r=11): # list of n-digit terms
        L = [] if n<4 else [[n]]
        for L1 in range(4, n//2+1):
            L.append([L1, n-2*L1, L1])
            L.extend([L1,L2]+M+[L2,L1] for L2 in range(n//2-1-L1)
                                         for M in A001232_row(n-(L1+L2)*2, 0))
        if not r: return L
        def f(L, s=0):
            for k,L in enumerate(L):
                s *= 10**L
                if not k%2: s += 10**(L-2)-1
            return r*s
        return sorted(map(f, A001232_row(n, 0))) # M. F. Hasler, Oct 04 2022

Formula

Theorem: Terms in this sequence have the form 99*m, where the decimal representation of m contains only 1's and 0's, is palindromic and contains no singleton 1's or 0's. Hence contains Fib(floor(k/2)-1) k-digit terms, k >= 4. - David W. Wilson, Dec 15 1997
a(A094707(n)) = 11*(10^n - 1) = 11*A002283(n) = 99*A002275(n), for n>1. - Lekraj Beedassy, Jun 11 2004. (Restored from history and corrected. - Ray Chandler, Oct 11 2017)
a(n) = 99*A061851(n) = A008918(n)/2. - M. F. Hasler, Oct 06 2022

Extensions

Corrected and extended by David W. Wilson, Aug 15 1996, Dec 15 1997
a(20)-a(21) from Arkadiusz Wesolowski, Aug 14 2012
a(1..10^4) in b-file double-checked with independent code by M. F. Hasler, Oct 04 2022

A008919 Numbers k such that k written backwards is a nontrivial multiple of k.

Original entry on oeis.org

1089, 2178, 10989, 21978, 109989, 219978, 1099989, 2199978, 10891089, 10999989, 21782178, 21999978, 108901089, 109999989, 217802178, 219999978, 1089001089, 1098910989, 1099999989, 2178002178, 2197821978, 2199999978, 10890001089
Offset: 1

Views

Author

Keywords

Comments

There are 2*Fibonacci(floor((n-2)/2)) terms with n digits (this is A214927 or essentially twice A103609). - N. J. A. Sloane, Mar 20 2013
All terms are made of "symmetric" concatenations of 1089 and/or 2178, with an arbitrary numbers of 9's inserted in the middle of these and 0's inserted between them. See A031877 for the reversals and further information: union of the two, sequences "made of" 1089 or 2178 only. - M. F. Hasler, Jun 23 2019
Also: 99 times A061852: numbers that are palindromic, have only digits in {0, 1} or in {0, 2}, and no isolated ("single") digit. - M. F. Hasler, Oct 17 2022

References

  • W. W. R. Ball and H. S. M. Coxeter. Mathematical Recreations and Essays (1939, page 13); 13th ed. New York: Dover, pp. 14-15, 1987.
  • Gardiner, Anthony, and A. D. Gardiner. Discovering mathematics: The art of investigation. Oxford University Press, 1987.
  • G. H. Hardy, A Mathematician's Apology (Cambridge Univ. Press, 1940, reprinted 2000), pp. 104-105 (describes this problem as having "nothing in [it] which appeals much to a mathematician").
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986.

Crossrefs

Cf. A001232 (9k = R(k)), A004086 (R(n): reverse), A008918 (4k = R(k)), A214927, A103609 (Fibonacci([n/2])). Reversals are in A031877.

Programs

  • Haskell
    a008919 n = a008919_list !! (n-1)
    a008919_list = [x | x <- [1..],
                        let (x',m) = divMod (a004086 x) x, m == 0, x' > 1]
    -- Reinhard Zumkeller, Feb 03 2012
    
  • Mathematica
    Reap[ Do[ If[ Reverse[ IntegerDigits[n]] == IntegerDigits[4*n], Print[n]; Sow[n]]; If[ Reverse[ IntegerDigits[n + 11]] == IntegerDigits[9*(n + 11)], Print[n + 11]; Sow[n + 11]], {n, 78, 2*10^10, 100}]][[2, 1]] (* Jean-François Alcover, Jun 19 2012, after David W. Wilson, assuming n congruent to 78 or 89 mod 100 *)
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; Sort[ Flatten[ {99#, 198#}&/@Flatten[Table[FromDigits/@Select[Tuples[ {0,1},n], okQ],{n,10}]]]] (* Harvey P. Dale, Jul 03 2013 *)
  • PARI
    is_A008919(n,r=A004086(n))={n>r && n%r==0} \\ M. F. Hasler, Jun 23 2019

Formula

If reverse(n) = k*n in base 10, then k = 1, 4 or 9 [Klosinski and Smolarski]. Hence A008919 is the union of A001232 and A008918. - David W. Wilson
a(n) = 99*A061852(n). - M. F. Hasler, Oct 17 2022

Extensions

Corrected and extended by David W. Wilson Aug 15 1996, Dec 15 1997

A101705 Numbers n such that n = 12*reversal(n).

Original entry on oeis.org

0, 540, 5940, 54540, 59940, 540540, 599940, 5400540, 5454540, 5945940, 5999940, 54000540, 54594540, 59405940, 59999940, 540000540, 540540540, 545454540, 545994540, 594005940, 594545940, 599459940, 599999940, 5400000540, 5405940540, 5454054540, 5459994540, 5940005940, 5945945940, 5994059940, 5999999940
Offset: 1

Views

Author

Farideh Firoozbakht, Jan 02 2005

Keywords

Comments

60 divides all terms of the sequence. For all nonnegative integers m and n all numbers of the form f(m,n) = (100*(6*10^m - 1)+ 40)*(10^((m + 2)*n) - 1)/(10^(m + 2) - 1) are in the sequence, in fact f(m,n) = (5.(9)(m))(n).0 where dot between numbers means concatenation and "(r)(t)" means number of r's is t. f(m,1) = 100*(6*10^m - 1)+ 40 = 5.(9)(m).40; f(0,1) = 540, f(1,1) = 5940, f(2,1)=59940, etc. f(m,2) = 5.(9)(m).50(9)(m).40; f(0,2) = 54540, f(1,2) = 5945940, etc. Let g(s,t,r) = s*(10^((L+t)(1+r))-1)/(10^(L+t)-1) where L = number of digits of s. If s is in the sequence then all numbers of the form g(s,t,r) for nonnegative integers t and r are in the sequence (the function g is the same function that has been defined in the sequence A101704). If n and m are nonnegative integers then g(n,0,m) = (n)(m+1) for example g(13,0,3) = (13)(4) = 13131313.

Examples

			g(540,0,5)= (540)(6) = 540540540540540540 is in the sequence because reversal(540540540540540540) = 45045045045045045 and 12*45045045045045045 = 540540540540540540.
		

Crossrefs

Programs

  • Mathematica
    Do[If[n == 12*FromDigits[Reverse[IntegerDigits[n]]], Print[n]], {n, 0, 6000000000, 60}]
    Select[Range[0,6*10^9,60],#==12IntegerReverse[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 12 2017 *)
  • Python
    def A101705(n):
        if n == 1: return 0
        a = 1<Chai Wah Wu, Jul 23 2024

Formula

a(n) = 540*A057148. - Ray Chandler, Oct 09 2017

Extensions

a(25)-a(31) from Max Alekseyev, Aug 18 2013

A222815 Numbers (not ending in 0) which are 4 times their digit-reversal.

Original entry on oeis.org

8712, 87912, 879912, 8799912, 87128712, 87999912, 871208712, 879999912, 8712008712, 8791287912, 8799999912, 87120008712, 87912087912, 87999999912, 871200008712, 871287128712, 879120087912, 879912879912, 879999999912, 8712000008712, 8712879128712, 8791200087912
Offset: 1

Views

Author

N. J. A. Sloane, Mar 11 2013

Keywords

Comments

There are Fibonacci(floor((n-2)/2)) terms with n digits (this is essentially A103609). - Ray Chandler, Oct 12 2017

Crossrefs

Equals 4*A008918.

Programs

  • Mathematica
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; Sort[Flatten[ (4*198)#&/@Flatten[Table[FromDigits/@Select[Tuples[{0,1},n],okQ],{n,12}]]]] (* Harvey P. Dale, Jul 03 2013 *)

A061851 Digital representation of n contains only 1's and 0's, is palindromic and contains no singleton 1's or 0's.

Original entry on oeis.org

11, 111, 1111, 11111, 110011, 111111, 1100011, 1111111, 11000011, 11100111, 11111111, 110000011, 111000111, 111111111, 1100000011, 1100110011, 1110000111, 1111001111, 1111111111, 11000000011, 11001110011, 11100000111, 11110001111, 11111111111, 110000000011, 110001100011
Offset: 1

Views

Author

Henry Bottomley, May 10 2001

Keywords

Comments

The terms can be constructed by gluing together terms from A355280 with their reversal as follows: The terms with odd length L = 2k-1 are given from the k-digit terms of A355280 by replacing the last digit with the reversal of the term. (Equivalently, concatenate with the reversal and delete one of the middle digits.) Terms with an even number L = 2k of digits are given as concatenation(m, reverse(m)) = m*10^L(m) + A004086(m) where m runs over the k-digit terms from A355280, and the (k-1)-digit terms with the 1's complement of the last digit appended. This explains the formula given in CROSSREFS for the number of terms of given length. - M. F. Hasler, Oct 17 2022

Crossrefs

Number of terms with k digits is Fibonacci(floor(k/2)) = A000045(A004526(k)).
Union of this sequence and twice this sequence is A061852 and 99 times that is A008919.
Cf. A214927, A001232, A222814, A008918, A008919, A222813 (terms converted to decimal).
Cf. A355280 (palindromic binary numbers with no digit run of length < 2).

Programs

  • PARI
    concat(apply( {A061851_row(n)=[fromdigits(binary(m))|m<-A222813_row(n)]}, [1..11])) \\ M. F. Hasler, Oct 17 2022
    
  • Python
    def A061851_row(n): return [] if n < 2 else [10**n//9] if n < 6 else [
        m*10**(n//2) + A004086(m//10) for m in A355280_row(n//2+1)] if n&1 else [
        m*10**(n//2) + A004086(m) for m in sorted(A355280_row(n//2)+
                            [x*10+1-x%10 for x in A355280_row(n//2-1)])]
    # M. F. Hasler, Oct 17 2022

Formula

a(n) = A001232(n)/99 = A008918(n)/198.
a(n) = A007088(A222813(n)), where A007088 = write in binary. - M. F. Hasler, Oct 06 2022

A101706 Numbers n such that reversal(n)=(7/3)*n.

Original entry on oeis.org

0, 3267, 32967, 329967, 3299967, 32673267, 32999967, 326703267, 329999967, 3267003267, 3296732967, 3299999967, 32670003267, 32967032967, 32999999967, 326700003267, 326732673267, 329670032967, 329967329967, 329999999967, 3267000003267, 3267329673267, 3296700032967, 3299670329967, 3299999999967
Offset: 1

Views

Author

Farideh Firoozbakht, Jan 01 2005

Keywords

Comments

If m is in the sequence then all numbers of the form g(m,s,t) for nonnagative integers s and t are in the sequence (the function g has been defined in the sequence A101704), for example g(3267,1,1)= 326703267 is in the sequence. If n=0 or n>1 then 33*(10^n-1) is in the sequence.
There are Fibonacci(floor((n-2)/2)) terms with n digits, n>1 (this is essentially A103609). - Ray Chandler, Oct 12 2017

Examples

			g(3267,10,2) = 32670000000000326700000000003267 is in the sequence
because reversal(32670000000000326700000000003267) =
76230000000000762300000000007623 =
(7/3)*32670000000000326700000000003267, g(3267,0,4) =
32673267326732673267 is in the sequence because
reversal(32673267326732673267) = 76237623762376237623 =
(7/3)*32673267326732673267.
		

Crossrefs

Programs

  • Mathematica
    Do[If[FromDigits[Reverse[IntegerDigits[n]]] == (7/3)*n, Print[n]], {n, 100000000}]

Extensions

Terms a(8) onward from Max Alekseyev, Aug 18 2013

A193434 6*n/5 = (n written backwards), n > 0.

Original entry on oeis.org

45, 495, 4545, 4995, 45045, 49995, 450045, 454545, 495495, 499995, 4500045, 4549545, 4950495, 4999995, 45000045, 45045045, 45454545, 45499545, 49500495, 49545495, 49954995, 49999995, 450000045, 450495045, 454504545, 454999545, 495000495, 495495495, 499504995
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 01 2011

Keywords

Examples

			495 belongs to this sequence because 6*495/5 = 594.
		

Crossrefs

Programs

  • Mathematica
    Rest@Select[FromDigits /@ Tuples[{0, 45}, 8], IntegerDigits[6*#/5] == Reverse@IntegerDigits[#] &] (* Arkadiusz Wesolowski, Aug 14 2012 *)
  • Python
    def A193434(n):
        a = 1<<(m:=n+1).bit_length()-2
        s = bin(a|(m&a-1))[2:]
        return 45*int(s+(s[::-1] if a&m else s[-2::-1])) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = 45*A057148(n+1). - Ray Chandler, Oct 09 2017

A071685 Non-palindromic numbers n, not divisible by 10, such that either n divides R(n) or R(n) divides n, where R(n) is the digit-reversal of n.

Original entry on oeis.org

1089, 2178, 8712, 9801, 10989, 21978, 87912, 98901, 109989, 219978, 879912, 989901, 1099989, 2199978, 8799912, 9899901, 10891089, 10999989, 21782178, 21999978, 87128712, 87999912, 98019801, 98999901, 108901089, 109999989
Offset: 1

Views

Author

Labos Elemer, Jun 03 2002

Keywords

Comments

The quotient R(n)/n or n/R(n) is always 4 or 9.
This is the union of the four sequence A001232, A222814, A008918, A222815. Equivalently, the union of A008919 and A031877.
There are 4*Fibonacci(floor((n-2)/2)) terms with n digits (this is 2*A214927 or essentially 4*A103609). - Ray Chandler, Oct 12 2017
Conjecture: every term mod 100 is equal to 1, 12, 78, or 89. - Harvey P. Dale, Dec 13 2017

Examples

			Palindromic solutions like 12021 or also solutions divisible by 10 were filtered out like {8380,838; q=10} or {8400,48; q=175}. In case of m>R(m), q=m/R(m)=4 or 9.
		

Crossrefs

Programs

  • Mathematica
    nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] ed[x_] := IntegerDigits[x] red[x_] := Reverse[IntegerDigits[x]] Do[s=Mod[Max[{n, tn[red[n]]}], Min[{n, r=tn[red[n]]}]]; If[Equal[s, 0]&&!Equal[Mod[n, 10], 0] &&!Equal[n, r], Print[{n, r/n}]], {n, 1, 1000000}]
    npnQ[n_]:=Module[{r=IntegerReverse[n]},!PalindromeQ[n]&&!Divisible[ n,10] &&(Mod[n,r]==0||Mod[r,n]==0)]; Select[Range[11*10^7],npnQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 13 2017 *)

Formula

x = q*R(x), q is an integer q<>1, q<>10^j and neither of x or R(x) is divisible by 10.

Extensions

Corrected and extended by Harvey P. Dale, Jul 01 2013
Edited by N. J. A. Sloane, Jul 02 2013
Missing terms inserted by Ray Chandler, Oct 09 2017
Incorrect comment removed by Ray Chandler, Oct 12 2017

A078273 Smallest multiple of n other than n using only the digits of n (no limit on frequency).

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 1111, 1212, 1131, 1414, 555, 1616, 1717, 1188, 1919, 200, 2121, 2222, 322, 2424, 225, 2262, 2727, 2828, 2929, 300, 1333, 3232, 3333, 3434, 3535, 3636, 333, 3838, 3393, 400, 4141, 4242, 344, 4444, 4455, 644, 4747, 4848
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Comments

a(k) = 10k if k contains a zero. a(n) <= (10^d +1)*n where d is the number of digits in n. There are some patterns in which every digit is used exactly as many times as it occurs in n. (A008918 and A001232). (1) a(2178) = 8712, a(21978) = 87912, a(219978) = 879912, etc... with a(n)/n = 4. A derived pattern is a(21782178) = 87128712, a(217821782178) = 871287128712 etc. (2) a(1089) = 9801, a(10989) = 98901, a(109989)= 989901,... with a(n)/n = 9. More patterns can be derived on similar lines.

Examples

			a(30) = 300, a(2178) = 8712, a(1089) = 9801.
		

Crossrefs

Programs

  • Mathematica
    smn[n_]:=Module[{k=2},While[!SubsetQ[IntegerDigits[n],IntegerDigits[ k*n]], k++];k*n]; Array[smn,50] (* Harvey P. Dale, Dec 03 2018 *)

Extensions

Corrected and extended by Sean A. Irvine, Mar 09 2010
Showing 1-10 of 13 results. Next