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 20 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

A008918 Numbers k such that 4*k = (k written backwards), k > 0.

Original entry on oeis.org

2178, 21978, 219978, 2199978, 21782178, 21999978, 217802178, 219999978, 2178002178, 2197821978, 2199999978, 21780002178, 21978021978, 21999999978, 217800002178, 217821782178, 219780021978, 219978219978, 219999999978, 2178000002178, 2178219782178
Offset: 1

Views

Author

Keywords

Comments

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

References

  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 41-42.
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986.

Crossrefs

Programs

  • Mathematica
    Rest@Select[FromDigits /@ Tuples[{0, 198}, 11], IntegerDigits[4*#] == Reverse@IntegerDigits[#] &] (* Arkadiusz Wesolowski, Aug 14 2012 *)
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; 198#&/@ Flatten[ Table[FromDigits/@Select[Tuples[{0,1},n],okQ],{n,20}]] (* Harvey P. Dale, Jul 03 2013 *)
  • PARI
    rev(n) = (eval(concat(Vecrev(Str(n)))));
    isok(n) = rev(n) == 4*n; \\ Michel Marcus, Sep 13 2015

Formula

Theorem (David W. Wilson): a(n) = 2*A001232(n).

Extensions

Corrected and extended by David W. Wilson Aug 15 1996, Dec 15 1997
a(20)-a(21) from Arkadiusz Wesolowski, Aug 14 2012

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

A091079 Numbers n which when converted to base 5, reversed and converted back to base 10 yield a number m such that n mod m = 0. Cases which are trivial or result in digit loss are excluded.

Original entry on oeis.org

16, 96, 416, 496, 576, 2016, 2496, 2976, 10016, 10416, 12096, 12496, 14976, 50016, 52416, 60096, 62496, 74976, 250016, 252016, 260416, 262416, 300096, 302096, 310496, 312496, 360576, 374976, 1250016, 1262016, 1300416, 1312416, 1500096, 1512096, 1550496
Offset: 1

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

Trivial cases are those numbers which upon conversion result in a number which is palindromic (m = reverse(m)), or a palindrome plus trailing zeros such that m = reverse(m)*10^z where z=number of lost zeros. Nontrivial digit loss occurs when a converted number has trailing zeros that drop off when the number is reversed.
n/m must be either 2 or 4. - Robert Israel, Apr 22 2021

Examples

			a(1) = 16 because: 16 in base 5 is 31; 31 reversed is 13; 13 converted back to base 10 is 8 and 16 mod 8 = 0.
		

Crossrefs

Cf. A091077 (same in base 3), A091078 (base 4), A091080 (base 6), A091081 (base 7), A091082 (base 8), A091083 (base 9), A031877 (base 10).
See also A222816, A214927.

Programs

  • Maple
    F:= proc(d) local eq,m,R;
      R:= NULL;
      for m in [2,4] do
        eq:= m*add(a[i]*5^i,i=0..d)-add(a[d-i]*5^i,i=0..d);
        R:= R, F1(eq,[],d);
      od;
    sort([R]);
    end proc:
    F1:= proc(eq,A,d) local V,s,e1,i1,i2,vlo,R,v1,v2,Vp,Vm,emax,emin;
          V:= indets(eq);
          if nops(V) = 0 then
             if eq = 0 then subs(A,add(a[d-i]*5^i,i=0..d))
             else NULL
             fi
          elif nops(V) = 1 then
             s:= solve(eq,V[1]);
             if member(s,[$0..4]) then
                subs([op(A),V[1]=s],add(a[d-i]*5^i,i=0..d));
             fi
          else
              Vp,Vm:= selectremove(t -> coeff(eq,t)>0, V);
             emax:= subs(map(`=`,Vp,4),map(`=`,Vm,0),eq);
             if emax < 0 then return NULL fi;
             emin:= subs(map(`=`,Vp,0),map(`=`,Vm,4),eq);
             if emin > 0 then return NULL fi;
               e1:= eq mod 5;
             V:= indets(e1);
             if nops(V) = 0 then procname(e1/5,A,d)
             elif nops(V) = 1 then
               s:= msolve(e1, 5);
               procname(subs(s,eq)/5, [op(A),op(s)], d)
             else
               i1:= op(1,V[1]); i2:= op(1,V[2]);
               if i1 = 0 or i2 = 0 then vlo:= 1 else vlo:= 0 fi;
               R:= NULL;
               for v1 from vlo to 4 do
                 s:= msolve(eval(e1, a[i1]=v1),5);
                 R:= R, procname(subs(a[i1]=v1, op(s), eq)/5, [op(A),a[i1]=v1,op(s)],d)
               od;
               R
          fi fi
    end proc:
    seq(op(F(d)),d=1..8); # Robert Israel, Apr 22 2021
  • PARI
    /* See A091077 and use PARI script with b=5 */

Extensions

More terms from Michel Marcus, Oct 10 2014

A090055 Numbers n divisible by at least one nontrivial permutation (rearrangement) of the digits of n.

Original entry on oeis.org

105, 108, 405, 510, 540, 702, 703, 810, 1001, 1005, 1008, 1020, 1050, 1053, 1080, 2002, 2016, 2025, 2040, 2050, 2079, 2100, 2106, 3003, 3024, 3042, 3045, 3060, 3105, 3402, 3510, 4004, 4005, 4050, 4070, 4080, 4200, 5005, 5010, 5040
Offset: 1

Views

Author

Chuck Seggelin, Nov 21 2003

Keywords

Comments

Trivial permutations are identified as (1) permutation = n, or (2) when n mod 10=0, permutations of n's digits which result in shifting only trailing zeros to the most significant side of n where they drop off, such that permutation = n/10^z, where z <= the number of trailing zeros of n. So if n were 1809000, the following permutations would be excluded as trivial: 1809000, 0180900, 0018090, 0001809.
A031877 (numbers which are multiples of their reversals) and both A084687 and A090053 (numbers divided by number formed by sorting their digits), are subsets of this sequence. This sequence differentiates itself by including terms such as 7425 which is divided by 2475 (a rearrangement of 7425's digits that is neither a reversal or an ascending sort.)

Examples

			a(27)=3045 because 3045 is divisible by 435, a nontrivial permutation of 3045. (0435)
		

Crossrefs

A091077 Numbers n which when converted to base 3, reversed and converted back to base 10 yield a number m such that n mod m = 0. Cases which are trivial or result in digit loss are excluded.

Original entry on oeis.org

64, 208, 640, 1936, 5248, 5824, 15616, 17488, 46720, 50752, 52480, 140032, 151840, 157456, 419968, 425152, 455104, 467200, 472384, 1259776, 1276624, 1364896, 1400320, 1417168, 3779200, 3794752, 3831040, 4094272, 4109824, 4199680, 4235968, 4251520
Offset: 1

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

Trivial cases are those numbers which upon conversion result in a number which is palindromic (m = reverse(m)), or a palindrome plus trailing zeros such that m = reverse(m)*10^z where z=number of lost zeros. Nontrivial digit loss occurs when a converted number has trailing zeros that drop off when the number is reversed.

Examples

			a(1) = 64 because: 64 in base 3 is 2101; 2101 reversed is 1012; 1012 converted back to base 10 is 32 and 64 mod 32 = 0.
		

Crossrefs

Cf. A091078 (same in base 4), A091079 (base 5), A091080 (base 6), A091081 (base 7), A091082 (base 8), A091083 (base 9), A031877 (base 10).

Programs

  • PARI
    isok(n, b=3) = {m = subst(Polrev(digits(n, b)), x, b); if (n % m, return(0));if ((n/m == 1), return (0)); vq = valuation(n, b); if (! vq, return (1)); qq = subst(Polrev(digits(m,b)), x, b); if (n == b^vq*qq, return (0)); return (1);} \\ Michel Marcus, Oct 10 2014

Extensions

More terms from Michel Marcus, Oct 10 2014

A091078 Numbers n which when converted to base 4, reversed and converted back to base 10 yield a number m such that n mod m = 0. Cases which are trivial or result in digit loss are excluded.

Original entry on oeis.org

225, 945, 3825, 15345, 57825, 61425, 230625, 245745, 921825, 968625, 983025, 368, 6625, 3871665, 3932145, 14745825, 14803425, 15483825, 15671025, 15728625, 589826, 25, 59224545, 61932465, 62672625, 62914545
Offset: 1

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

Trivial cases are those numbers which upon conversion result in a number which is palindromic (m = reverse(m)), or a palindrome plus trailing zeros such that m = reverse(m)*10^z where z=number of lost zeros. Nontrivial digit loss occurs when a converted number has trailing zeros that drop off when the number is reversed.

Examples

			a(1) = 225 because: 225 in base 4 is 3201; 3201 reversed is 1023; 1023 converted back to base 10 is 75 and 225 mod 75 = 0.
		

Crossrefs

Cf. A091077 (same in base 3), A091079 (base 5), A091080 (base 6), A091081 (base 7), A091082 (base 8), A091083 (base 9), A031877 (base 10).

Programs

  • PARI
    /* See A091077 and use PARI script with b=4 */

Extensions

More terms from Michel Marcus, Oct 10 2014

A091080 Numbers n which when converted to base 6, reversed and converted back to base 10 yield a number m such that n mod m = 0. Cases which are trivial or result in digit loss are excluded.

Original entry on oeis.org

980, 1225, 6020, 7525, 36260, 45325, 217700, 272125, 1271060, 1306340, 1588825, 1632925, 7621460, 7838180, 9526825, 9797725, 45723860, 46817540, 47029220, 57154825, 58521925, 58786525
Offset: 1

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

Trivial cases are those numbers which upon conversion result in a number which is palindromic (m = reverse(m)), or a palindrome plus trailing zeros such that m = reverse(m)*10^z where z=number of lost zeros. Nontrivial digit loss occurs when a converted number has trailing zeros that drop off when the number is reversed.

Examples

			a(1) = 980 because: 980 in base 6 is 4312; 4312 reversed is 2134; 2134 converted back to base 10 is 490 and 980 mod 490 = 0.
		

Crossrefs

Cf. A091077 (same in base 3), A091078 (base 4), A091079 (base 5), A091081 (base 7), A091082 (base 8), A091083 (base 9), A031877 (base 10).

Programs

  • PARI
    /* See A091077 and use PARI script with b=6 */

Extensions

More terms from Michel Marcus, Oct 10 2014

A091081 Numbers n which when converted to base 7, reversed and converted back to base 10 yield a number m such that n mod m = 0. Cases which are trivial or result in digit loss are excluded.

Original entry on oeis.org

36, 288, 1800, 2052, 2304, 12384, 14400, 16416, 86472, 88236, 99072, 100836, 115200, 605088, 619200, 691776, 705888, 806688, 4235400, 4247748, 4323600, 4335948, 4840704, 4853052, 4928904, 4941252, 5534208, 5647104, 29647584, 29746368, 30254400, 30353184
Offset: 1

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

Trivial cases are those numbers which upon conversion result in a number which is palindromic (m = reverse(m)), or a palindrome plus trailing zeros such that m = reverse(m)*10^z where z=number of lost zeros. Nontrivial digit loss occurs when a converted number has trailing zeros that drop off when the number is reversed.

Examples

			a(1) = 36 because: 36 in base 7 is 51; 51 reversed is 15; 15 converted back to base 10 is 12 and 36 mod 12 = 0.
		

Crossrefs

Cf. A091077 (same in base 3), A091078 (base 4), A091079 (base 5), A091080 (base 6), A091082 (base 8), A091083 (base 9), A031877 (base 10).

Programs

  • PARI
    /* See A091077 and use PARI script with b=7 */

Extensions

More terms from Michel Marcus, Oct 10 2014
Showing 1-10 of 20 results. Next