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-5 of 5 results.

A031877 Nontrivial reversal numbers (numbers which are integer multiples of their reversals), excluding palindromic numbers and multiples of 10.

Original entry on oeis.org

8712, 9801, 87912, 98901, 879912, 989901, 8799912, 9899901, 87128712, 87999912, 98019801, 98999901, 871208712, 879999912, 980109801, 989999901, 8712008712, 8791287912, 8799999912, 9801009801, 9890198901, 9899999901, 87120008712, 87912087912, 87999999912
Offset: 1

Views

Author

Keywords

Comments

The terms of this sequence are sometimes called palintiples.
All terms are of the form 87...12 = 4*21...78 or 98...01 = 9*10...89. [This was proved by Hoey, 1992. - N. J. A. Sloane, Oct 19 2014] More precisely, they are obtained from concatenated copies of either 8712 or 9801, with 9's inserted "in the middle of" these and/or 0's inserted between the copies these, in a symmetrical way. A008919 lists the reversals, but not in the same order, e.g., R(a(2)) < R(a(1)). - M. F. Hasler, Aug 18 2014
There are 2*Fibonacci(floor((n-2)/2)) terms with n digits (this is A214927 or essentially twice A103609). - Ray Chandler, Oct 11 2017

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.
  • 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.").

Crossrefs

See A008919 for reversals (this is the main entry for the problem).
Union of A222814 and A222815.
Subsequence of A118959.

Programs

  • Haskell
    a031877_list = [x | x <- [1..], x `mod` 10 > 0,
                        let x' = a004086 x, x' /= x && x `mod` x' == 0]
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits@n}, Mod[n, FromDigits@ Reverse@id] == 0 && n != FromDigits@ Reverse@ id && Mod[n, 10] > 0]; k = 1; lst = {}; While[k < 10^9, If[fQ@k, AppendTo[lst, k]; Print@k]; k++ ]; lst (* Robert G. Wilson v, Jun 11 2010 *)
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; Sort[Flatten[ {(4*198)#,(9*99)#}&/@Flatten[Table[FromDigits/@Select[Tuples[ {0,1},n], okQ],{n,12}]]]] (* Harvey P. Dale, Jul 03 2013 *)
  • PARI
    is_A031877(n)={n%10 && n%A004086(n)==0 && n>A004086(n)} \\ M. F. Hasler, Aug 18 2014
    
  • Python
    A031877 = []
    for n in range(1,10**7):
        if n % 10:
            s1 = str(n)
            s2 = s1[::-1]
            if s1 != s2 and not n % int(s2):
                A031877.append(n) # Chai Wah Wu, Sep 05 2014

Formula

a(n) = A004086(a(n))*[9/(a(n)%10)], where [...]=9 if a(n) ends in "1" and [...]=4 if a(n) ends in "2". - M. F. Hasler, Aug 18 2014

Extensions

More terms from Jud McCranie, Aug 15 2001
More terms from Sam Mathers, Aug 18 2014

A061467 Remainder when the larger of n and its reverse is divided by the smaller.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 5, 13, 6, 13, 3, 9, 15, 0, 9, 0, 9, 18, 2, 10, 18, 26, 5, 0, 5, 9, 0, 9, 18, 27, 36, 7, 15, 0, 13, 18, 9, 0, 9, 18, 27, 36, 45, 0, 6, 2, 18, 9, 0, 9, 18, 27, 36, 0, 13, 10, 27, 18, 9, 0, 9, 18, 27, 0, 3, 18, 36, 27, 18, 9, 0, 9, 18, 0, 9, 26, 7, 36, 27
Offset: 0

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Comments

a(n)=0 if n is in A002113, A008919 or A118959. - Robert Israel, Jul 18 2019

Examples

			a(12)=9 since 21/12 = 1 with remainder 9.
		

Crossrefs

Programs

  • Haskell
    a061467 0 = 0
    a061467 n = mod (max n n') (min n n') where n' = a004086 n
    -- Reinhard Zumkeller, Dec 31 2013
  • Mathematica
    l := {} For[i = 1, i < 100, i++, x := FromDigits[Reverse[IntegerDigits[i]]]; If[x >= i, AppendTo[l, Mod[x, i]], AppendTo[l, Mod[i, x]]]] l (* Jake Foster, Jun 05 2008 *)
    rln[n_]:=Module[{r=IntegerReverse[n]},If[r>n,Mod[r,n],Mod[n,r]]]; Join[ {0}, Array[rln,90]] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* Harvey P. Dale, Apr 03 2016 *)
  • PARI
    { for (n=0, 1000, x=n; r=0; while (x>0, d=x-10*(x\10); x\=10; r=r*10 + d); p=max(n, r); q=min(n, r); write("b061467.txt", n, " ", p%q) ) } \\ Harry J. Smith, Jul 23 2009
    

A087993 Numbers k for which the quotient q(k)=(k+rev(k))/abs(k-rev(k)) is an integer.

Original entry on oeis.org

45, 54, 495, 594, 4356, 4545, 4995, 5454, 5895, 5985, 5994, 6534, 10890, 19602, 20691, 29403, 30492, 39204, 40293, 43956, 45045, 49005, 49995, 50094, 54054, 59994, 65934, 68607, 70686, 77319, 91377, 109890, 197802, 208791, 296703, 307692
Offset: 1

Views

Author

Labos Elemer, Oct 08 2003

Keywords

Examples

			n = 45, rev(n) = 54, q = 99/9 = 9 integer;
n = 934065, rev(n) = 560434, q = 1494504/373626 = 4, integer.
		

Crossrefs

Cf. A087994 (the quotients), A118959.

Programs

  • Mathematica
    rev[n_] := FromDigits@ Reverse@ IntegerDigits@ n; Select[Range[10^5], # != (r = rev[#]) && Mod[# + r, # - r] == 0 &] (* Giovanni Resta, May 14 2017 *)

A273239 Non-palindromic numbers whose reversal is a palindrome.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 200, 220, 300, 330, 400, 440, 500, 550, 600, 660, 700, 770, 800, 880, 900, 990, 1000, 1010, 1100, 1110, 1210, 1310, 1410, 1510, 1610, 1710, 1810, 1910, 2000, 2020, 2120, 2200, 2220, 2320, 2420, 2520, 2620, 2720, 2820, 2920
Offset: 1

Views

Author

Giovanni Teofilatto, May 18 2016

Keywords

Comments

Subsequence of A118959. - Altug Alkan, May 18 2016

Crossrefs

Extensions

More terms from Altug Alkan, May 18 2016

A359173 Numbers whose square can be expressed as k * A004086(k) with non-palindromic k.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 200, 220, 252, 300, 330, 400, 403, 440, 500, 504, 550, 600, 660, 700, 770, 800, 816, 880, 900, 990, 1000, 1010, 1100, 1110, 1210, 1310, 1410, 1510, 1610, 1710, 1810, 1910, 2000, 2020, 2120, 2200, 2220, 2320, 2420, 2520, 2620, 2720, 2772
Offset: 1

Views

Author

Hugo Pfoertner, Dec 17 2022

Keywords

Comments

If k is a term, then so is 10*k. - Robert Israel, Dec 23 2022

Examples

			a(1) = 10 because 100*1 = 10^2;
a(2) = 20: 200*2 = 20^2;
a(11) = 110: 1100*11 = 110^2;
a(14) = 252: 144*441 = 252^2;
a(28) = 816: 768*867 = 816^2.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end proc:
    g:= proc(d,m) local r; r:= rev(d); r <> d and m = d*r end proc:
    filter:= proc(n) ormap(g, numtheory:-divisors(n^2),n^2) end proc:
    select(filter, [$1..3000]); # Robert Israel, Dec 23 2022
  • PARI
    L=List(); for (k=1, 3*10^6, my (r=fromdigits(Vecrev(digits(k))), s); if (issquare(r*k, &s) && r!=k, if(s<3001, listput(L, s)))); Set(L)
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A359173_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:any(d*int(str(d)[::-1])==n**2 for d in divisors(n**2,generator=True) if d != n),count(max(startvalue,1)))
    A359173_list = list(islice(A359173_gen(),30)) # Chai Wah Wu, Dec 19 2022
Showing 1-5 of 5 results.