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.

A278930 a(n) is the least positive integer that differs (in absolute value) by an (n+1)-st power from the reverse of its binary representation.

This page as a plain text file.
%I A278930 #54 Apr 05 2025 17:56:10
%S A278930 2,36,100,2081,8257,32897,131329,524801,2098177,8390657,33558529,
%T A278930 134225921,536887297,2147516417,8590000129,34359869441,137439215617,
%U A278930 549756338177,2199024304129,8796095119361,35184376283137,140737496743937,562949970198529,2251799847239681
%N A278930 a(n) is the least positive integer that differs (in absolute value) by an (n+1)-st power from the reverse of its binary representation.
%C A278930 The numbers whose binary representation is a palindrome are excluded by definition because 0 is not a power of a positive number.
%C A278930 It might be thought that the first term should be 1 instead of 2, since by prepending its binary representation (itself) with a zero we get 01 with reverse 10 (decimal 2), and their difference in absolute value is abs(1-2)=1, which is itself its 1st power 1^1. However, leading zeros are ignored. Another alternative interpretation is to consider 1 as a palindrome, which also excludes it from this sequence.
%H A278930 Colin Barker, <a href="/A278930/b278930.txt">Table of n, a(n) for n = 1..1000</a>
%H A278930 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-14,8).
%F A278930 For n>3, a(n) = 1+2*(2^n+4^(n+1)).
%F A278930 From _Colin Barker_, Dec 02 2016: (Start)
%F A278930 a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3) for n>6.
%F A278930 G.f.: x*(2 + 22*x - 124*x^2 + 1869*x^3 - 5198*x^4 + 3432*x^5) / ((1 - x)*(1 - 2*x)*(1 - 4*x)).
%F A278930 (End)
%e A278930 2 in binary is 10, its binary reverse 01 or simply 1 is the decimal number 1, subtracting them gives abs(2-1)=1, and since 1 is its own square, a(1)=2.
%e A278930 36 in binary is 100100, its binary reverse 1001 is the decimal number 9, subtracting them abs(36-9)=27=3^3, a third power, therefore a(2)=36.
%e A278930 100 in binary is 1100100, its binary reverse 10011 is the decimal number 19, subtracting them abs(100-19)=81=3^4, a fourth power, therefore a(3)=100.
%e A278930 For n>3 if we represent zeros with dots and place the binary representation for each term followed by its reverse, up to n=12 we obtain the graph:
%e A278930 1.....1....1
%e A278930 1....1.....1,
%e A278930 1......1.....1
%e A278930 1.....1......1,
%e A278930 1.......1......1
%e A278930 1......1.......1,
%e A278930 1........1.......1
%e A278930 1.......1........1,
%e A278930 1.........1........1
%e A278930 1........1.........1,
%e A278930 1..........1.........1
%e A278930 1.........1..........1,
%e A278930 1...........1..........1
%e A278930 1..........1...........1,
%e A278930 1............1...........1
%e A278930 1...........1............1,
%e A278930 1.............1............1
%e A278930 1............1.............1;
%e A278930 which illustrates better why the absolute value should be part of the definition, and how the difference is an (n+1)th power: From the first two rows for a(4) we have abs(2081-2113) = abs(-32) = 2^5.
%t A278930 Rest@ CoefficientList[Series[x (2 + 22 x - 124 x^2 + 1869 x^3 - 5198 x^4 + 3432 x^5)/((1 - x) (1 - 2 x) (1 - 4 x)), {x, 0, 24}], x] (* _Michael De Vlieger_, Dec 07 2016 *)
%t A278930 LinearRecurrence[{7,-14,8},{2,36,100,2081,8257,32897},30]
%o A278930 (PARI) a(n)=if(n>3,1+2*(2^n+4^(n+1)),[2,36,100][n]);
%o A278930 (PARI) Vec(x*(2 + 22*x - 124*x^2 + 1869*x^3 - 5198*x^4 + 3432*x^5) / ((1 - x)*(1 - 2*x)*(1 - 4*x)) + O(x^30)) \\ _Colin Barker_, Dec 02 2016
%Y A278930 Inspired by: A278328.
%Y A278930 Cf. A283050.
%K A278930 nonn,easy,base
%O A278930 1,1
%A A278930 _R. J. Cano_, Dec 01 2016
%E A278930 More terms from _Colin Barker_, Dec 02 2016