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

A072032 a(n) = gcd(2^n, reverse(2^n)) = gcd(2^n, A004086(2^n)) = A055483(2^n).

Original entry on oeis.org

2, 4, 8, 1, 1, 2, 1, 4, 1, 1, 2, 8, 2, 1, 1, 4, 1, 2, 1, 1, 2, 2, 2, 1, 1, 16, 1, 2, 1, 1, 4, 4, 2, 1, 1, 2, 1, 8, 1, 1, 8, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 8, 4, 1, 1, 1, 1, 1, 8, 1, 1, 16, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 8, 1, 1, 1, 1, 1, 1, 8, 1, 2, 2, 1, 1, 1, 1, 1, 1, 16, 1, 8, 1, 1
Offset: 1

Views

Author

Labos Elemer, Jun 07 2002

Keywords

Examples

			n=12: a(12) = gcd(4096,6904) = 8.
		

Crossrefs

Programs

  • Mathematica
    nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] red[x_] := Reverse[IntegerDigits[x]] Table[GCD[2^w, tn[red[2^w]]], {w, 1, 128}]

A371034 For n >= 1, a(n) = A004086(n) if A055483(n) = 1, otherwise a(n) = n / A055483(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 31, 41, 5, 61, 71, 2, 91, 10, 7, 1, 32, 4, 52, 13, 3, 14, 92, 10, 13, 23, 1, 43, 53, 4, 73, 83, 13, 10, 14, 7, 34, 1, 5, 23, 74, 4, 94, 10, 17, 25, 35, 6, 1, 65, 19, 85, 95, 10, 16, 31, 7, 32, 56, 1, 76, 34, 23, 10, 17, 8, 37, 47
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 31 2024

Keywords

Comments

Also a(n) = R(n) if (n, R(n)) are coprime, otherwise a(n) = n / GCD(n, R(n)), where R(n) is the digit reversal of n. a(n) = 1 for n from the union of A011557 and A002113 and A001232 and A008918.

Examples

			n = 13: A004086(13) = 31, A055483(13) = 1 thus a(13) = 31.
n = 15: A004086(15) = 51, A055483(15) = 3 thus a(15) = 15/3 = 5.
		

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:
    f:= proc(n) local r,g;
      r:= rev(n);
      g:= igcd(n,r);
      if g = 1 then r else n/g fi
    end proc;
    map(f, [$1..100]); # Robert Israel, Jul 09 2024
  • Mathematica
    a[n_] := Module[{r = IntegerReverse[n], g}, g = GCD[n, r]; If[g == 1, r, n/g]]; Array[a, 100] (* Amiram Eldar, Mar 31 2024 *)

Formula

a(A011557(k)) = 1, k >= 0.
a(A002113(k)) = 1, k >= 2.
a(A001232(k)) = 1, k >= 1.
a(A008918(k)) = 1, k >= 1.

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

A071249 Numbers k such that gcd(k, R(k)) > 1, where R(k) (A004086) is the digit reversal of k.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 18, 20, 21, 22, 24, 26, 27, 28, 30, 33, 36, 39, 40, 42, 44, 45, 46, 48, 50, 51, 54, 55, 57, 60, 62, 63, 64, 66, 68, 69, 70, 72, 75, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90, 93, 96, 99, 101, 102, 105, 108, 110, 111, 114, 117, 120, 121
Offset: 1

Views

Author

Amarnath Murthy, May 21 2002

Keywords

Comments

Numbers k such that A055483(k) > 1. - Reinhard Zumkeller, Jun 18 2013

Crossrefs

Cf. A004086, A055483, A226778 (complement).

Programs

  • Haskell
    a071249 n = a071249_list !! (n-1)
    a071249_list = filter ((> 1) . a055483) [1..]
    -- Reinhard Zumkeller, Jun 18 2013
  • Mathematica
    Select[ Range[125], GCD[ #, FromDigits[ Reverse[ IntegerDigits[ # ]]]] > 1 & ]

Extensions

Edited by Robert G. Wilson v, Jun 07 2002
Definition corrected by N. J. A. Sloane, Aug 27 2020 following a suggestion from José Hernández Santiago

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

A226778 Numbers having no common divisor > 1 with their reversal in decimal representation (see A043537).

Original entry on oeis.org

1, 10, 13, 14, 16, 17, 19, 23, 25, 29, 31, 32, 34, 35, 37, 38, 41, 43, 47, 49, 52, 53, 56, 58, 59, 61, 65, 67, 71, 73, 74, 76, 79, 83, 85, 89, 91, 92, 94, 95, 97, 98, 100, 103, 104, 106, 107, 109, 112, 113, 115, 116, 118, 119, 122, 124, 125, 127, 128, 130
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 18 2013

Keywords

Comments

A055483(a(n)) = 1.

Crossrefs

Cf. A043537, A055483, A071249 (complement).

Programs

  • Haskell
    a226778 n = a226778_list !! (n-1)
    a226778_list = filter ((== 1) . a055483) [1..]
    
  • Mathematica
    Select[Range[130], GCD[#, FromDigits[Reverse[IntegerDigits[#]]]] == 1 &] (* Jayanta Basu, Jul 24 2013 *)
    Select[Range[150],Intersection[Divisors[#],Divisors[IntegerReverse[#]]] == {1}&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 07 2020 *)
  • PARI
    isok(n) = gcd(n, subst(Pol(Vecrev(digits(n))), x, 10)) == 1; \\ Michel Marcus, Jul 02 2015
    
  • PARI
    is(n)=gcd(fromdigits(Vecrev(digits(n))), n)==1 \\ Charles R Greathouse IV, Aug 25 2016

A256756 a(n) = bitwise XOR of n and the reverse of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 25, 18, 39, 60, 45, 86, 67, 72, 22, 25, 0, 55, 50, 45, 36, 83, 78, 65, 29, 18, 55, 0, 9, 22, 27, 108, 117, 122, 44, 39, 50, 9, 0, 27, 110, 101, 100, 111, 55, 60, 45, 22, 27, 0, 121, 114, 111, 100, 58, 45, 36, 27, 110, 121
Offset: 0

Views

Author

Alois P. Heinz, Apr 09 2015

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> Bits[Xor](n, (s-> parse(cat(s[-i]$i=1..length(s))))(""||n)):
    seq(a(n), n=0..80);
  • Mathematica
    Table[BitXor[n,FromDigits[Reverse[IntegerDigits[n]]]],{n,0,65}] (* Ivan N. Ianakiev, Apr 10 2015 *)
  • PARI
    a(n) = bitxor(n, subst(Polrev(digits(n)), x, 10)); \\ Michel Marcus, Apr 10 2015

Formula

a(n) = A003987(n, A004086(n)).
Showing 1-10 of 22 results. Next