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.

A329342 Irregular table whose rows list the nontrivial cycles of the ghost iteration A329201, starting with the smallest member.

Original entry on oeis.org

8290, 8969, 9102, 17998, 24199, 21819, 20041, 22084, 21800, 20020, 21901, 23792, 25219, 54503, 55656, 55767, 55978, 56399, 55039, 87290, 88869, 88892, 88909, 89108, 108070, 126947, 141300, 221901, 223792, 225219, 554503, 555656, 555767, 555978, 556399, 555039
Offset: 1

Views

Author

M. F. Hasler, Nov 10 2019

Keywords

Comments

A329201 consists of adding or subtracting the number whose digits are the differences of adjacent digits of n, depending on its parity. Repdigits A010785 are fixed points of this map, but some numbers enter nontrivial cycles.
This sequence lists these cycles, ordered by their smallest member which is always listed first.
Sequence A329341 gives the lengths of these cycles, i.e., rows of this table.
Whenever all terms of a cycle have the same number of digits and same initial digit, then this digit can be prefixed k times to each term to obtain a different cycle of same length, for any k >= 0. (The corresponding "ghosts" A040115(n) are then the same, so the first differences are also the same and add again up to 0.) This is the case for rows 3, 4, 5, 6, ... of this table. Rows 7, 8, 11, ... are subsequent members of the respective family. We could call "primitive" the cycles which are not obtained from an earlier cycle by duplicating the initial digits.

Examples

			The table starts:
   n |  cycle #n  (length = A329341(n))
  ---+------------------------------------------------------------------
   1 |  8290,    8969,   9102
   2 |  17998,  24199,  21819,  20041,  22084,  21800, 20020
   3 |  21901,  23792,  25219
   4 |  54503,  55656,  55767,  55978,  56399,  55039
   5 |  87290,  88869,  88892,  88909,  89108
   6 | 108070, 126947, 141300
   7 | 221901, 223792, 225219
   8 | 554503, 555656, 555767, 555978, 556399, 555039
   9 | 741683, 775208, 772880, 767272, 778827, 779892, 782009, 798218, 819835
  10 | 810001, 881002, 873900, 859210, 893921,
     | 910592, 992139, 985013, 971501, 997952, 1000195, 900011
  11 | 887290, 888869, 888892, 888909, 889108
  12 | 1108070, 1126947, 1141300
  13 | 2221901, 2223792, 2225219
  14 | 4350630, 4476263, 4507706
  15 | 5461741, 5587374, 5618817
  16 | 5554503, 5555656, 5555767, 5555978, 5556399, 5555039
  17 | 6572852, 6698485, 6729928
  18 | 8887290, 8888869, 8888892, 8888909, 8889108
  19 | 9071007, 10047114, 11090717, 10890951
  20 | 10807007, 12694714, 14130077
  21 | 11108070, 11126947, 11141300
  22 | 22221901, 22223792, 22225219
  23 | 44350630, 44476263, 44507706
  24 | 55461741, 55587374, 55618817
  25 | 55554503, 55555656, 55555767, 55555978, 55556399, 55555039
  26 | 66572852, 66698485, 66729928
  27 | 88887290, 88888869, 88888892, 88888909, 88889108
  28 | 90710050, 100471105, 110907120, 108909508
  29 | 98311327, 99831542, 99679130, 99991953, 99983111,
     | 99967911, 99936631, 99873599, 99759359, 99534735, 99113393
  30 | 108070010, 126947021, 141300742
  31 | 110807007, 112694714, 114130077
  32 | 111108070, 111126947, 111141300
  33 | 222221901, 222223792, 222225219
  34 | 329112807, 346914494, 359297549, 384069764, 329606552,
     | 346972655, 334647245, 335870766, 333553056, 333755407,
     | 334175554, 335537555, 333513355, 333271335, 333115133, 332910713, 331128951
  35 | 444350630, 444476263, 444507706
  36 | 555461741, 555587374, 555618817
  37 | 555554503, 555555656, 555555767, 555555978, 555556399, 555555039
  38 | 666572852, 666698485, 666729928
  39 | 829021565, 896942976, 910295697
  40 | 888887290, 888888869, 888888892, 888888909, 888889108
  41 | 998311327, 999831542, 999679130, 999991953, 999983111,
     | 999967911, 999936631, 999873599, 999759359, 999534735, 999113393
		

Crossrefs

Cf. A329341 (row lengths), A329201, A329196 (analog for A329200), A329198.

Programs

  • PARI
    T(n,T=[n])={while(!setsearch(Set(T),n=A329201(n)), T=concat(T,n));T} \\ trajectory; a cycle if n is a member of it.
    {U=0; M=[]; for(n=9, oo, bittest(U>>=1, 0) && next; if(M && n>M[1], print(T(M[1])); M=M[^1]); t=n; V=U; while( !bittest(U, -n+t=A329201(t)), t>n || next(2); U+=1<<(t-n)); bittest(V, t-n) || #Set(digits(t))==1 || M=setunion(M, [vecmin(T(t))]) )}

Extensions

Rows 12 through 41 from Scott R. Shannon, Nov 12 2019

A329340 Size of the orbit of n under "ghost iterations" A329201 (rule B).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 4, 3, 6, 3, 5, 3, 5, 3, 5, 2, 1, 3, 2, 3, 2, 5, 2, 9, 2, 4
Offset: 0

Views

Author

M. F. Hasler, Nov 11 2019

Keywords

Comments

Or: Number of iterations of A329201 until a number is seen for the second time in the trajectory of n.
A329201 consists of subtracting from or adding to n, depending on whether it is even or odd, the number A040115(n) whose digits are the differences of adjacent digits of n.
The trajectory of all numbers < 8000 ends in a repdigit (A010785), which are fixed points of this map. Some larger numbers enter nontrivial cycles, cf. A329342. In both cases, some number(s) will appear infinitely often in the trajectory. This sequence gives the number of iterations until a value is repeated for the first time in the trajectory of n. This is also the size of n's orbit, i.e. the total number of distinct values that will occur.
If n is part of a cycle (n in A329342), a(n) gives the length of the cycle; in particular a(n) = 1 for fixed points.
For 11 <= n <= 99 the pattern ( 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2) of length 11 repeats. But the trajectory of those n with same a(n) does not always end in the corresponding repdigit.

Examples

			For repdigits A010785 and in particular single-digit numbers, {0, 1, ..., 9, 11, 22, ...}, A329201(n) = n, so O(n) = {n} and a(n) = 1.
For others we have:
10 -> 11, so a(10) = #{10, 11} = 2.
12 -> 13 -> 11, so a(10) = #{12, 13, 11} = 2. Also 23 -> 24 -> 22, so a(23) = 3, and similarly for 34, 45, 56, 67 and 78. But 89 -> 90 -> 99, the next *larger* repdigit!
20 -> 18 -> 25 -> 28 -> 22, whence a(20) = 5. Similarly, 31 -> 29 -> 36 -> 39 -> 33, a(31) = 5, too. But 42 -> 40 -> 36 -> 39 -> 33 goes to the next *lower* repdigit, yet still has a(42) = 5.
		

Crossrefs

Cf. A329201, A329197 (analog for A329200), A329342 (list of cycles), A329341 (length of cycles), A329196, A329197 (cycles for A329200).

Programs

  • PARI
    apply( A329340(n,M=oo,U=[n])={for(k=1,M,setsearch(U,n=A329201(n))&&return(k); U=setunion(U,[n]))}, [0..122])

Formula

a(n) = 1 <=> n is a fixed point of A329201 <=> n is a repdigit number (A010785).
a(n) = a(n') if 11 <= n, n' <= 99 and n == n' (mod 11).
a(n) = # orbit(n) where orbit(n) = { (A329201^k)(n); k >= 0 }.
Showing 1-2 of 2 results.