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.

Previous Showing 41-50 of 83 results. Next

A066054 'Reverse and Add!' trajectory of 10583.

Original entry on oeis.org

10583, 49084, 97178, 184357, 937838, 1776577, 9533348, 17966707, 88733678, 176367466, 841131137, 1572262285, 7394885036, 13700769973, 51697470704, 92404950319, 183710890748, 1030808908129, 10248906988430, 13737867972631
Offset: 0

Views

Author

Klaus Brockhaus, Nov 30 2001

Keywords

Examples

			a(1) = 10583 + 38501 = 49084.
		

Crossrefs

Programs

  • ARIBAS
    : m := 10583; stop := 20; c := 0; rev := int_reverse(m); while m <> rev and c < stop do inc(c); write(m," "); m := m + rev; rev := int_reverse(m); end;
    
  • Haskell
    a066054 n = a066054_list !! n
    a066054_list = iterate a056964 10583 -- Reinhard Zumkeller, Sep 22 2011
  • Mathematica
    NestList[# + FromDigits[Reverse[IntegerDigits[#]]]&,  10583, 40] (* Vincenzo Librandi, May 03 2014 *)
  • PARI
    Rev(x)= { local(d, r=0); while (x>0, d=x%10; x\=10; r=r*10 + d); return(r) } { a=10583; for (n = 0, 150, if (n, a+=Rev(a)); write("b066054.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 08 2009
    

A256754 a(n) = bitwise AND of n and the reverse of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 4, 13, 8, 3, 16, 1, 16, 19, 0, 4, 22, 0, 8, 16, 26, 8, 16, 28, 2, 13, 0, 33, 34, 33, 36, 1, 2, 5, 0, 8, 8, 34, 44, 36, 0, 10, 16, 16, 0, 3, 16, 33, 36, 55, 0, 9, 16, 27, 4, 16, 26, 36, 0, 0, 66, 64, 68, 64, 6, 1, 8, 1, 10
Offset: 0

Views

Author

Alois P. Heinz, Apr 09 2015

Keywords

Crossrefs

Programs

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

Formula

a(n) = A004198(n,A004086(n)).

A256755 a(n) = bitwise OR of n and the reverse of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 29, 31, 47, 63, 61, 87, 83, 91, 22, 29, 22, 55, 58, 61, 62, 91, 94, 93, 31, 31, 55, 33, 43, 55, 63, 109, 119, 127, 44, 47, 58, 43, 44, 63, 110, 111, 116, 127, 55, 63, 61, 55, 63, 55, 121, 123, 127, 127, 62, 61, 62, 63, 110
Offset: 0

Views

Author

Alois P. Heinz, Apr 09 2015

Keywords

Crossrefs

Programs

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

Formula

a(n) = A003986(n,A004086(n)).

A356648 Numbers whose square is of the form k + reversal of digits of k, for some k.

Original entry on oeis.org

2, 4, 11, 22, 25, 33, 101, 121, 141, 202, 222, 264, 303, 307, 451, 836, 1001, 1111, 1221, 1232, 2002, 2068, 2112, 2222, 2305, 2515, 2626, 2636, 2776, 3003, 3958, 3972, 4015, 4081, 7975, 8184, 9757, 10001, 10201, 10401, 11011, 11121, 11211, 12012, 12021, 12221, 13046, 16581, 20002
Offset: 1

Views

Author

Nicolay Avilov, data a(10)-a(37) from Oleg Sorokin, Dec 10 2022

Keywords

Comments

Square roots of the squares in A067030.

Examples

			4 is a term since 4^2 = 16 = 8 + 8;
11 is a term since 11^2 = 121 = 29 + 92 is sum of k=29 and its reversal 92;
22 is a term since 22^2 = 484 = 143 + 341;
10201 is a term since 10201^2 = 104060401 = 100030400 + 4030001.
		

Crossrefs

Programs

  • PARI
    L=vectorsmall(100000);
    \\ Takes a few minutes of CPU time
    for (k=1, 2*10^8, my(d=digits(k), r=fromdigits(Vecrev(d)), s); if (issquare(k+r, &s), L[s]=1));
    for (k=1, 21000, if(L[k], print1(k,", "))) \\ Hugo Pfoertner, Dec 13 2022
    (C++, Haskell) See Code Golf link.

Formula

a(n) = sqrt(A358880(n)). - Michel Marcus, Dec 25 2022

Extensions

a(38) and beyond from Hugo Pfoertner, Dec 12 2022

A055954 a(n) = n + reversal of base 7 digits of n (written in base 10).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 8, 16, 24, 32, 40, 48, 56, 16, 24, 32, 40, 48, 56, 64, 24, 32, 40, 48, 56, 64, 72, 32, 40, 48, 56, 64, 72, 80, 40, 48, 56, 64, 72, 80, 88, 48, 56, 64, 72, 80, 88, 96, 50, 100, 150, 200, 250, 300, 350, 64, 114, 164, 214, 264, 314, 364, 78, 128, 178
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of digits in base 7 then a(n) is a multiple of 8

Crossrefs

Programs

  • Mathematica
    Table[n+FromDigits[Reverse[IntegerDigits[n,7]],7],{n,0,70}] (* Harvey P. Dale, Jan 29 2020 *)
  • PARI
    a(n) = n + fromdigits(Vecrev(digits(n, 7)), 7); \\ Michel Marcus, Aug 08 2024

Formula

a(n) = n + A030106(n).

A072367 Squares x such that x + reverse of x is a prime.

Original entry on oeis.org

1, 100, 196, 625, 10816, 13456, 15376, 18496, 21025, 22201, 22801, 24649, 25921, 27889, 29929, 33856, 35344, 36100, 42025, 50176, 60025, 63001, 70756, 71824, 73984, 78400, 82369, 83521, 96100, 1012036, 1048576, 1073296, 1123600, 1144900
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 18 2002

Keywords

Examples

			196 is a term because 196 is a square and 196+691=887 is a prime.
		

Crossrefs

Programs

  • Magma
    [k:k in [m^2:m in [1..1100]]| IsPrime(Seqint(Intseq(k,10))+Seqint(Reverse(Intseq(k,10))))]; // Marius A. Burtea, Jun 20 2019
  • Maple
    select(t -> isprime(t+revdigs(t)), [seq(i^2,i=1..10000)]); # Robert Israel, Jun 19 2019
  • Mathematica
    Select[Range[1100]^2,PrimeQ[#+FromDigits[Reverse[IntegerDigits[#]]]]&]  (* Harvey P. Dale, Feb 20 2011 *)
  • PARI
    isok(x) = issquare(x) && isprime(x+fromdigits(Vecrev(digits(x)))); \\ Michel Marcus, Jun 19 2019
    

A072385 Primes which can be represented as the sum of a prime and its reverse.

Original entry on oeis.org

383, 443, 463, 787, 827, 887, 929, 1009, 1049, 1069, 1151, 1171, 1231, 1373, 1453, 1493, 1777, 30203, 30403, 31013, 32213, 32413, 32423, 33023, 33223, 34033, 34843, 35053, 36263, 36653, 37273, 37463, 37663, 38083, 38273, 38873, 39293, 39883
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 20 2002

Keywords

Comments

This set is the image under the "reverse and add" operation (A056964) of the Luhn primes A061783 (which remain prime under that operation). Those have always an odd number of digits, and start with an even digit. Therefore this sequence has its terms in intervals [3,20]*100^k with k = 1, 2, 3.... - M. F. Hasler, Sep 26 2019

Examples

			383 is a term because it is prime and it is the sum of prime 241 and its reverse 142.
		

Crossrefs

Cf. A004086 (reverse), A004087 (primes reversed), A056964 (reverse & add), A061783 (Luhn primes), A086002 (similar, using "rotate" instead of "reverse").

Programs

  • Mathematica
    f@n_:=(Select[# + IntegerReverse[#] & /@ Prime[Range[n]], PrimeQ@# && # <= Prime[n] &] // Union); f@3000 (* Harvey P. Dale, Jul 18 2018; corrected by Hans Rudolf Widmer, Aug 15 2024 *)
  • PARI
    is_A072385(p)={isprime(p)&&forprime(q=p\10,p*9\10,A056964(q)==p&&return(1))} \\ A056964(n)=n+fromdigits(Vecrev(digits(n))). It is much faster to produce the terms as shown below, rather than to "select" them from a range of primes. - M. F. Hasler, Sep 26 2019
    
  • PARI
    A072385=Set(apply(A056964, A061783)) \\ with, e.g.: A061783=select(is_A061783(p)={isprime(A056964(p))&&isprime(p)}, primes(8713)) - M. F. Hasler, Sep 26 2019

Formula

a(n) = A056964(A061783(n)). - M. F. Hasler, Sep 26 2019

Extensions

Cross-references added by M. F. Hasler, Sep 26 2019

A190481 Number of distinct integers with n digits which are the image of integers by the function Reverse and Add!.

Original entry on oeis.org

4, 14, 93, 256, 1793, 4872, 34107, 92590, 648154, 1759313, 12315269, 33427272, 233991155, 635119194, 4445835138, 12067267861, 84470877438, 229278099157, 1604946701532, 4356283914175, 30493987422124, 82769394462323, 579385761306789, 1572618495070552
Offset: 1

Views

Author

Aldo González Lorenzo, May 25 2011

Keywords

Comments

a(n) is the cardinality of the set of Image(Reverse and Add!) intersected with [10^(n-1), 10^n[. Here we suppose that the domain of the function Reverse and Add! is {1, 2, 3, ...}
There are 4, 50, 450, 4590, 45405,... (A232731) ways to obtain integers with n = 1,2,... digits as images under the function "Reverse and add!", but many result in the same image and are counted here only once. Example: 11+digrev(11) = 22 and 20+digrev(20)=22 contribute only once to the set of distinct images at n=2. - R. J. Mathar, Jun 17 2011

Examples

			Example: let RaA(x) be the function Reverse and Add!, then:
RaA(1)=2
RaA(2)=4
RaA(3)=6
RaA(4)=8
RaA(5)=10
RaA(6)=11, ...
So a(1) is the cardinal of {2,4,6,8}, which is 4:
		

Crossrefs

Programs

  • Maple
    A055642 := proc(n) max(1,1+ilog10(n)) ; end proc:
    A056964 := proc(n) n+digrev(n) ; end proc:
    A190481 := proc(n) local s,i,ra ; s := {} ; for i from 1 to 10^n do ra := A056964(i) ; if A055642( ra) = n then s := s union {ra}  ; end if; end do: nops(s) ; end proc:
    for n from 1 do print(n,A190481(n)) ; end do: # R. J. Mathar, Jun 17 2011

Formula

Empirical g.f.: x*(4 + 18*x + 23*x^2 - 29*x^3 - 58*x^4 - 34*x^5 - 81*x^6 - 45*x^7 - 32*x^8 - 9*x^9) / ((1 + x)*(1 - 19*x^2)*(1 - 2*x + x^2 - x^3)*(1 + 2*x + x^2 + x^3)). - Colin Barker, Mar 20 2017

Extensions

a(9)-a(10) from Lars Blomberg, Dec 01 2013
a(11)-a(24) from Hiroaki Yamanouchi, Sep 04 2014

A256398 Palindromes of the form i^2 + reverse(i)^2.

Original entry on oeis.org

0, 2, 8, 101, 242, 404, 585, 909, 10001, 12221, 14841, 20402, 24642, 40004, 44244, 48884, 50805, 90009, 96269, 1000001, 1030301, 1080801, 1210121, 1244421, 1298921, 1440441, 1478741, 1690961, 2004002, 2234322, 2468642, 2484842, 4000004, 4050504, 4410144
Offset: 1

Views

Author

Bui Quang Tuan, Mar 28 2015

Keywords

Comments

Is 864666666468 the only term in this sequence that has an even number of digits? - Jon E. Schoenfield, Mar 30 2015
The next terms with an even number of digits are 5807785995877085, 56359464311346495365, and 943614966934439669416349, which are obtained for i = 37939066, 3553782166, 529145826418 (and their reverses). - Giovanni Resta, Aug 22 2025

Examples

			Palindrome 585 is in the sequence because 585 = 12^2 + 21^2.
The smallest term that can be obtained in more than one way is 125484521 = 11020^2 + 2011^2 = 11200^2 + 211^2. Are there any terms that can be obtained in more than two ways? - _Jon E. Schoenfield_, Mar 30 2015
		

Crossrefs

Cf. A002113 (palindromes), A056964 (n+rev(n)).
Cf. A256437.

Programs

  • Mathematica
    Sort@ DeleteDuplicates@ Select[Table[n^2 + FromDigits[Reverse[IntegerDigits@ n]]^2, {n, 10000}], Reverse@ IntegerDigits@ # == IntegerDigits@ # &] (* Michael De Vlieger, Mar 28 2015 *)
  • PARI
    rev(n)=r="";d=digits(n);for(i=1,#d,r=concat(Str(d[i]),r));eval(r)
    v=[];for(n=0,10^4,if(rev(P=(n^2+rev(n)^2))==P,v=concat(v,P)));vecsort(v,,8) \\ Derek Orr, Mar 29 2015

Extensions

Data corrected by Derek Orr, Mar 29 2015

A319603 a(n) = n^3 + reversal of digits of n^3.

Original entry on oeis.org

0, 2, 16, 99, 110, 646, 828, 686, 727, 1656, 1001, 2662, 9999, 10109, 7216, 9108, 11000, 8107, 8217, 16445, 8008, 10890, 95249, 88288, 56655, 68276, 85147, 58374, 47864, 122731, 27072, 49583, 119491, 109890, 79697, 100699, 112320, 86258, 82717, 150714, 64046, 81907, 162135, 150104
Offset: 0

Views

Author

Seiichi Manyama, Sep 24 2018

Keywords

Crossrefs

n^b + reversal of digits of n^b: A056964 (b=1), A061226 (b=2), this sequence (b=3).
Cf. A000578, A004165, A072384 (subsequence of primes).

Programs

  • PARI
    {a(n) = n^3+fromdigits(Vecrev(digits(n^3)))}

Formula

a(n) = A000578(n) + A004165(n).
Previous Showing 41-50 of 83 results. Next