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.

A331556 The lower (or left) offset of a 196-iterate (A006960) from the largest palindrome less than the iterate.

Original entry on oeis.org

5, 9, 14, 99, 52, 89, 100, 407, 268, 10769, 10890, 99, 99, 4400, 8900, 9890, 10000, 97625, 1089, 3584, 99, 629882, 1099890, 10989, 926, 890000, 8491505, 10890099, 8229644, 9999989, 69923062, 10890000, 99099000, 43337905, 99990089, 962943454, 109890, 454649691
Offset: 1

Views

Author

James D. Klein, Jan 20 2020

Keywords

Comments

When normalized over (0,1) by their respective palindrome-free interval about a 196-iterate, it has been empirically observed that the frequency distribution of this sequence appears to be quite symmetric about 0.5, as well as fractal when plotting the distribution over decreasing bin sizes.
The 196-iterates referred to here come from the reverse-and-add process generating A006960.

Examples

			The first term is 5 since 196-191 = 5
The second term is 9 since 887-878 = 9, etc.
		

Crossrefs

Programs

  • Mathematica
    Map[Block[{k = # - 1}, While[k != IntegerReverse@ k, k--]; # - k] &, NestList[# + IntegerReverse[#] &, 196, 25]] (* brute force, or *)
    Map[# - Block[{n = #, w, len, ww}, w = IntegerDigits[n]; len = Length@ w; ww = Take[w, Ceiling[len/2] ]; If[# < n, #, FromDigits@ Flatten@{#, If[OddQ@ len, Reverse@ Most@ #, Reverse@ #]} &@ If[Last@ ww == 0, MapAt[# - 1 &, Most@ ww, -1]~Join~{9}, MapAt[# - 1 &, ww, -1]]] &@ FromDigits@ Flatten@ {ww, If[OddQ@ len, Reverse@ Most@ ww, Reverse@ ww]}] &, NestList[# + IntegerReverse[#] &, 196, 37]] (* Michael De Vlieger, Jan 22 2020 *)
  • Python
    # Slow Brute-force
    n = 196
    while n < 10**15:
      m = n
      while m != int(str(m)[::-1]): m+=-1
      print(n-m, end=', ')
      n = n + int(str(n)[::-1])

Formula

a(n) = A331560(n) - A331557(n).

Extensions

More terms from Michael De Vlieger, Jan 22 2020

A331557 The upper (or right) offset of a 196-iterate (A006960) from the smallest palindrome greater than the iterate.

Original entry on oeis.org

6, 1, 96, 11, 48, 11, 10, 693, 732, 231, 110, 10901, 10901, 5600, 1100, 110, 1000, 12375, 108911, 96416, 99901, 470118, 110, 1089011, 999074, 110000, 2508495, 109901, 1770356, 11, 40076938, 99110000, 10901000, 56662095, 9911, 137056546, 1099890110, 545350309
Offset: 1

Views

Author

James D. Klein, Jan 20 2020

Keywords

Comments

When normalized over (0,1) by their respective palindrome-free interval about a 196-iterate, it has been empirically observed that the frequency distribution of this sequence appears to be quite symmetric about 0.5, as well as fractal when plotting the distribution over decreasing bin sizes.
The 196-iterates referred to here come from the reverse-and-add process generating A006960.

Examples

			The first term is 6 since 202-196 = 6;
The second term is 1 since 888-887 = 1; etc.
		

Crossrefs

Programs

  • Python
    # Upper 196 offsets. Slow brute force
    n = 196
    while n < 10**15:
      m = n
      while m != int(str(m)[::-1]): m+=1
      print(m-n)
      n = n + int(str(n)[::-1])

Formula

a(n) = A331560(n) - A331556(n).

Extensions

More terms from Jinyuan Wang, Feb 29 2020
Showing 1-2 of 2 results.