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

A071686 Smallest solution to gcd(x, Rev(x)) = 2^n.

Original entry on oeis.org

2, 4, 8, 2192, 21920, 291008, 610688, 2112256, 2131456, 2937856, 25329664, 230465536, 694018048, 2344321024, 4688642048, 2112421888, 65012891648, 650128916480, 4494196736, 63769149440, 637691494400, 23842827272192, 276298064723968, 420127895977984, 4897795987210240
Offset: 1

Views

Author

Labos Elemer, Jun 03 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = 2^n}, While[GCD[k, FromDigits@ Reverse@ IntegerDigits@ k] != 2^n, k += 2^n]; k]; Array[a, 17] (* Giovanni Resta, Nov 14 2019 *)

Formula

a(n) = A069554(2^n).

Extensions

a(22)-a(25) from Giovanni Resta, Oct 29 2019

A072005 Smallest solution to gcd(k, reverse(k)) = 3^n.

Original entry on oeis.org

1, 3, 9, 2889, 2899999989, 4899999987, 19899999972, 29898999693, 49989958299, 49999917897, 99884394999, 372797889885, 1989767716659, 2678052898989, 17902896898419, 137530987695297, 189281899170567, 368055404997498, 14048104419899757, 437893473401621955, 218264275944702783
Offset: 0

Views

Author

Labos Elemer, Jun 04 2002

Keywords

Examples

			n=4: 3^4 = 81, a(4) = 2899999989 = 3*3*3*3*35802469, reverse(a(4)) = 2*3*3*3*3*61111111; gcd = 81 = 3^n.
		

Crossrefs

Formula

a(n) = A069554(3^n).

Extensions

a(15)-a(20) from Giovanni Resta, Oct 30 2019

A072021 Smallest solution to gcd(x, reverse(x)) = 5^n.

Original entry on oeis.org

5, 5200, 521000, 5213750, 521875, 5218750, 52130234375, 5734841796875, 57869714843750, 526046650390625, 5265674365234375, 52187008544921875, 526515306396484375, 5213023309008789062500, 5213596736358642578125, 5260466086273193359375, 526041911745452880859375
Offset: 1

Views

Author

Labos Elemer, Jun 06 2002

Keywords

Examples

			For n = 4, gcd(521875, 578125) = 3125 = 5^4.
For n = 8, a(8) = 5734841796875 = 5^9*2936239, reverse(a(8)) = 5786971484375 = 5^8*71*208657.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k = 1); while (gcd(k, fromdigits(Vecrev(digits(k)))) != 5^n, k++); k;} \\ Michel Marcus, Jul 13 2018

Formula

a(n) = A069554(5^n).

Extensions

a(9)-a(18) from Hiroaki Yamanouchi, Sep 10 2014

A072016 Numbers k such that gcd(k, reverse(k)) = 27 = 3^3, where reverse(x) = A004086(x).

Original entry on oeis.org

2889, 3699, 3888, 3969, 4779, 4887, 5589, 5697, 5778, 5859, 5886, 5967, 6399, 6669, 6777, 6885, 6939, 7398, 7479, 7587, 7668, 7695, 7749, 7776, 7857, 7884, 7938, 7965, 8289, 8397, 8559, 8667, 8775, 8829, 8883, 8937, 9099, 9288, 9369, 9396, 9477, 9558, 9585
Offset: 1

Views

Author

Labos Elemer, Jun 05 2002

Keywords

Comments

Solutions to gcd(k, reverse(k)) = 1,3,9 (lower powers of 3) are trivial (see A072005).

Examples

			2889 = 107*3*3*3, 9889 = 3*3*3*3*2*61.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..10^4] | Gcd(n,Seqint(Reverse(Intseq(n)))) eq 27]; // Vincenzo Librandi, Jul 11 2018
  • Mathematica
    Select[Range[10^4], GCD[#, FromDigits[Reverse[IntegerDigits[#]]]] == 27 &] (* Vincenzo Librandi, Jul 11 2018 *)
  • PARI
    isok(n) = gcd(n, fromdigits(Vecrev(digits(n)))) == 27; \\ Michel Marcus, Jul 11 2018
    

A072050 Smallest solution to GCD(x,A004086(x))=7^n.

Original entry on oeis.org

7, 18718, 343, 125204947, 231012215, 11298657013, 211066659013, 117088913464607, 2846847905744815, 108244538579770418, 2080795357577501075, 18312871825384462928, 26268977180287044053417, 1734582041294009627423816
Offset: 1

Views

Author

Labos Elemer, Jun 10 2002

Keywords

Crossrefs

Programs

Formula

a(n) = A069554(7^n).

Extensions

a(8)-a(9) from Max Alekseyev, Jun 17 2011
a(10)-a(14) from Giovanni Resta, Oct 30 2019

A333666 Smallest k > 0 with gcd(k, rev(k)) = n, where rev(k) is digit reversal of k and with sum of digits of k = n, or 0 if no such k exists.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 209, 48, 4000009, 21182, 5055, 21184, 13328, 288, 12844, 0, 1596, 2398, 13892, 2976, 52675, 45890, 2889, 61768, 178292, 0, 177475, 29984, 42999, 279718, 529865, 29988, 1009009009009, 485678, 1951599, 0, 694499, 655998, 1677688, 658988
Offset: 1

Views

Author

Ruediger Jehn and Kester Habermann, Sep 03 2020

Keywords

Comments

This differs from A069554 in that, additionally, the sum of the digits of a(n) must be equal to n. This is not required in A069554.
As gcd(k, rev(k)) = n, n | k and n | rev(k). - David A. Corneth, Sep 03 2020
Since the sum of the digits of k is n and n | k, all the terms that are not 0 are Niven numbers (A005349). - Amiram Eldar, Sep 03 2020
The first digit of any number of this sequence is less than or equal to the last digit of this number (provided that the last digit is nonzero), because if k satisfies all requirements, also rev(k) does. This means that numbers starting with a "9" are quite rare. So far we have found only 9. But numbers ending with a "1" seem to be even less frequent. Amongst the first 303 terms of this sequence there is none except the trivial solution a(1) = 1. The second term of this sequence ending with a "1", if it exists, is still to be found. - Ruediger Jehn, Sep 20 2020 [Corrected by Pontus von Brömssen, Oct 07 2021]

Examples

			a(11) = 209. The sum of the digits is 11 and gcd(209,902) = 11.
a(12) = 48. The sum of the digits is 12 and gcd(48,84) = 12.
		

Crossrefs

Programs

  • Mathematica
    m = 36; s = Table[0, {m}]; c = 0; n = 1; While[c < m - Quotient[m, 10], g = GCD[n, FromDigits @ Reverse @ (d = IntegerDigits[n])]; If[g <= m && g == Plus @@ d && s[[g]] == 0, c++; s[[g]] = n]; n++]; s (* Amiram Eldar, Sep 03 2020 *)
  • PARI
    a(n) = {if ((n % 10) == 0, return(0)); my(k=n); while (! ((sumdigits(k)==n) && (gcd(k, fromdigits(Vecrev(digits(k)))) == n)), k+=n); k;} \\ Michel Marcus, Sep 03 2020
  • Python
    for n in range(11, 20):
        for k in range(n, 1000000000, n):
           s = str(k)
           revk = "" # digit reversal of k
           sum = 0
           for i in range(len(s)):
              revk = revk + s[len(s) - i - 1]
              sum = sum + int(s[i])
           g = gcd(k,int(revk))
           if g == n and sum == n:
              print(n, k, revk, g)
              break
    

Formula

a(10*n) = 0 since all multiples of 10 have a 0 at the end, but their reverse numbers have no 0 at the end and therefore 10*n cannot be their gcd.

A072018 Numbers k for which gcd(k, reverse(k)) = 243 = 3^5.

Original entry on oeis.org

4899999987, 4989999897, 4999889997, 4999997889, 5889998997, 5889999969, 5898989997, 5898998988, 5899899789, 5899979979, 5899987998, 5899989699, 5899996989, 5979999879, 5988899997, 5988998898, 5989889979, 5989897998
Offset: 1

Views

Author

Labos Elemer, Jun 05 2002

Keywords

Examples

			k = 4899999987 = 3*3*3*3*3*157*128437 and reverse(k) = 78999999984 = 2*2*2*2*3*3*3*3*3*3*2031893, gcd = 243. Numerous but not all solutions are obtained by inserting strings of 9's between digits of A071016. Further such regular transformations exist.
		

Crossrefs

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

A071687 Non-palindromic numbers such that either x=q1.Rev[x] or Rev[x]=q2.x, where R[x]=A004086[x] and q1 or q2 are integers not divisible by 10.

Original entry on oeis.org

510, 540, 810, 1089, 2100, 2178, 4200, 5200, 5610, 5700, 5940, 6300, 8400, 8712, 8910, 9801, 10989, 21978, 23100, 27000, 46200, 51510, 52200, 52800, 54540, 56610, 57200, 59940, 65340, 69300, 81810, 87912, 89910, 98901, 109989, 212100, 217800
Offset: 1

Views

Author

Labos Elemer, Jun 03 2002

Keywords

Examples

			Includes special cases of A071685. Examples represented by {n, Rev[n], integer-quotient} triples: {1089, 9801, 9}, {87912, 21979, 4}, {5610, 165, 34}, {610000, 16, 38125}, etc.
		

Crossrefs

Programs

  • Mathematica
    nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] ed[x_] := IntegerDigits[x] red[x_] := Reverse[ed[x]] Do[s=Mod[ma=Max[{n, tn[red[n]]}], mi=Min[{n, r=tn[red[n]]}]]; If[Equal[s, 0]&&!Equal[n, r] &&!Equal[Mod[ma/mi, 10], 0], Print[{n, r, Max[r/n, n/r]}]], {n, 1, 1000000}]

Formula

q=Max[n/Rev[n], Rev[n]/n]=10m+r integer, where r>0, q>1.

A072017 Numbers k such that gcd(k, reverse(k)) = 81 = 3^4, where reverse(x) = A004086(x).

Original entry on oeis.org

2899999989, 2989999899, 2999889999, 3799999899, 3898989999, 3899799999, 3899999988, 3979989999, 3988899999, 3989999898, 3989999979, 3998999889, 3999889998, 3999898989, 3999899799, 3999979989, 3999988899, 4699998999
Offset: 1

Views

Author

Labos Elemer, Jun 05 2002

Keywords

Comments

Numerous solutions can be constructed by inserting strings of suitable digits between digits of terms in A071016.

Examples

			k = 3*3*3*3*3*449*64157 and reverse(k) = 2*2*3*3*3*3*31*67*14827, GCD = 81.
		

Crossrefs

Showing 1-10 of 12 results. Next