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

A329544 Add the odd terms and subtract the even ones, the result must always be a palindrome. This is the lexicographically earliest sequence of distinct positive integers with this property.

Original entry on oeis.org

1, 3, 2, 5, 4, 19, 11, 22, 6, 17, 14, 8, 7, 15, 16, 27, 24, 13, 18, 29, 26, 37, 33, 44, 28, 39, 36, 25, 30, 41, 38, 49, 46, 35, 40, 51, 48, 59, 45, 10, 68, 32, 21, 20, 9, 55, 58, 47, 50, 61, 60, 71, 66, 77, 23, 12, 88, 191, 101, 111, 91, 112, 31, 81, 121, 131, 141, 70, 132, 80, 122, 90, 142, 174, 43, 54, 72, 83, 53, 42
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Nov 16 2019

Keywords

Comments

Negative palindromes are not allowed (0 is OK). After 50000 terms, the smallest unused integers are 919, 1020, 1029, 1031, 1038, 1041, 1047, ... and the largest used is 208831. The largest palindrome produced so far is 1000001. Is the sequence a permutation of the integers > 0?
After one million terms, the smallest unused integers are still the seven mentioned (above) for 50000 terms. - Hans Havermann, Nov 27 2019
This sequence is not a permutation of the nonnegative integers because it cannot contain any term of A104444. The value 919 may only appear after a running total equal to 0 (see A083142, A084843). - Rémy Sigrist, Dec 11 2019. There are only two 0's in the first million terms of A329796, at n=12 and n=1002, so the chance that this happens seems slight. On the other hand, the zeros in the base 3 analog, A330314, are more plentiful (see A330325), so further investigation is needed. - Hans Havermann and N. J. A. Sloane, Dec 12 2019

Examples

			The sequence starts with 1 which is positive and a palindrome.
1 + 3 = 4 (palindrome). (2 is not allowed because 1 - 2 < 0.)
1 + 3 - 2 = 2 (palindrome)
1 + 3 - 2 + 5 = 7 (palindrome)
1 + 3 - 2 + 5 - 4 = 3 (palindrome)
1 + 3 - 2 + 5 - 4 + 19 = 22 (palindrome)
1 + 3 - 2 + 5 - 4 + 19 + 11 = 33 (palindrome)
1 + 3 - 2 + 5 - 4 + 19 + 11 - 22 = 11 (palindrome), etc.
		

Crossrefs

Cf. A329545 (same idea, but where the odd integers are subtracted and the even ones are added).
Cf. A002113 (palindromes), A086862 (first differences), A104444, A329796 (running totals), A329797, A329798 (records), A330311 (when n appears).

Programs

  • PARI
    A329544_vec(N,u=1,U,a,s,d)={vector(N,n, a=u; while(bittest(U,a-u)|| Vecrev(d=digits(s-(-1)^a*a))!=d|| (a>s&&!bittest(a,0)),a++); s-=(-1)^a*a; U+=1<<(a-u); while(bittest(U,0), U>>=1; u++);a)} \\ M. F. Hasler, Nov 16 2019

A329797 Record high water marks in A329544.

Original entry on oeis.org

1, 3, 5, 19, 22, 27, 29, 37, 44, 49, 51, 59, 68, 71, 77, 88, 191, 195, 197, 199, 201, 205, 207, 211, 303, 313, 323, 324, 333, 343, 344, 348, 353, 354, 363, 364, 373, 374, 475, 485, 516, 526, 536, 548, 617, 1609, 1782, 1829, 1921, 2031, 2079, 2195, 2211, 2321
Offset: 1

Views

Author

N. J. A. Sloane, Dec 10 2019

Keywords

Crossrefs

Showing 1-2 of 2 results.