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

A316679 The integer 907 and its infinite growing pattern (when iterating the rule explained in A316650 and hereunder, in the Comment section).

Original entry on oeis.org

907, 5611, 4318, 26914, 12238, 76414, 34738, 138913, 555613, 2222413, 13890013, 55560013, 222240013, 1389000013, 5556000013, 22224000013, 138900000013, 555600000013, 2222400000013, 13890000000013, 55560000000013, 222240000000013, 1389000000000013, 5556000000000013, 22224000000000013
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jul 10 2018

Keywords

Comments

It is conjectured, when iterating the idea explained in A316650 ("Result when n is divided by the sum of its digits and the resulting integer is concatenated to the remainder"), that all integers will end either on a fixed point (the first ones are listed in A052224) or grow forever (like 907 or 1358).

Examples

			907/16 gives 56 with remainder 11;
5611/13 gives 431 with remainder 8;
4318/16 gives 269 with remainder 14;
26914/22 gives 122 with remainder 38;
. . .
Now from 2222413 on, starts a devilish 0-inflation "from the middle" in a ternary cycle:
2222413
13890013
55560013
222240013
1389000013
5556000013
22224000013
138900000013
555600000013
2222400000013
13890000000013
55560000000013
222240000000013
1389000000000013
5556000000000013
22224000000000013
138900000000000013
555600000000000013
2222400000000000013
. . .
We have:
1389(k zeros)13
5556(k zeros)13
22224(k zeros)13
then:
1389(k+2 zeros)13
5556(k+2 zeros)13
22224(k+2 zeros)13
then:
1389(k+4 zeros)13
5556(k+4 zeros)13
22224(k+4 zeros)13
Etc.
		

Crossrefs

Cf. A316650 (where the rule is explained) and A316680 (for the number 1358 that generates a similar pattern).

Programs

  • Mathematica
    NestList[FromDigits@ Flatten[IntegerDigits@ # & /@ QuotientRemainder[#, Total[IntegerDigits@ #]]] &, 907, 24] (* Michael De Vlieger, Jul 10 2018 *)

A316680 The integer 1358 and its infinite continuation (when iterating the rule explained in A316650 and in the Comment section here).

Original entry on oeis.org

1358, 7915, 35917, 143617, 65281, 29677, 95710, 435010, 334624, 152104, 117004, 90004, 69235, 276910, 1107610, 6922510, 27690010, 110760010, 692250010, 2769000010, 11076000010, 69225000010, 276900000010, 1107600000010, 6922500000010, 27690000000010, 110760000000010, 692250000000010, 2769000000000010
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jul 10 2018

Keywords

Comments

It is conjectured, when iterating the idea explained in A316650 ("Result when n is divided by the sum of its digits and the resulting integer is concatenated with the remainder"), that all integers will end either on a fixed point (the first ones are listed in A052224) or grow forever (like 907 or 1358).

Examples

			1358/17 gives 79 with remainder 15;
7915/22 gives 359 with remainder 17;
35917/25 gives 1436 with remainder 17;
143617/22 gives 6528 remainder 1;
...
After 6922510 starts a devilish inflation "from the middle", in a ternary cycle:
6922510
27690010
110760010
692250010
2769000010
11076000010
69225000010
276900000010
1107600000010
6922500000010
27690000000010
110760000000010
692250000000010
2769000000000010
11076000000000010
69225000000000010
276900000000000010
1107600000000000010
6922500000000000010
...
We have:
2769(k zeros)10
11076(k zeros)10
69225(k zeros)10
then:
2769(k+2 zeros)10
11076(k+2 zeros)10
69225(k+2 zeros)10
then:
2769(k+4 zeros)10
11076(k+4 zeros)10
69225(k+4 zeros)10
Etc.
		

Crossrefs

Cf. A316650 (where the rule is explained).
Cf. A316679 (for an equivalent pattern produced by 907).

Programs

  • Mathematica
    NestList[FromDigits@ Flatten[IntegerDigits@ # & /@ QuotientRemainder[#, Total[IntegerDigits@ #]]] &, 1358, 28] (* Michael De Vlieger, Jul 10 2018 *)

A340618 Numbers k such that A316650(k) is prime.

Original entry on oeis.org

13, 15, 19, 23, 31, 33, 35, 37, 43, 47, 51, 52, 59, 73, 78, 85, 93, 94, 97, 99, 105, 106, 109, 113, 115, 119, 127, 129, 139, 141, 149, 159, 163, 165, 168, 169, 179, 181, 189, 199, 211, 213, 218, 231, 232, 237, 245, 251, 256, 258, 259, 271, 273, 274, 275, 294, 301, 303, 304, 307, 339, 344, 347, 348
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 15 2021

Keywords

Examples

			a(4) = 23 is a term because A316650(23) = 43 is prime.
		

Crossrefs

Cf. A316650.

Programs

  • Maple
    f:= proc(n) local a,b,c;
      c:= convert(convert(n,base,10),`+`);
      a:= floor(n/c);
      b:= n mod c;
      10^(1+ilog10(b))*a+b;
    end proc:
    select(n -> isprime(f(n)), [$1..100]);

A316678 Smallest numbers leading in n steps to a term that repeats itself, according to the rule explained in A316650 (and hereunder in the Comment section).

Original entry on oeis.org

19, 31, 13, 16, 32, 11, 23, 15, 236, 282, 341, 1047, 787, 419, 286, 626, 557, 498, 1357, 1001, 368, 1921, 917, 2077, 3319, 3457, 5090, 2294, 2144, 3501, 4485, 10661, 16753, 3092, 5252, 3475, 2102, 3572, 656, 1691, 7461, 10445, 4596, 13937, 15964, 25540, 14380
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jul 10 2018

Keywords

Comments

It is conjectured, when iterating the idea explained in A316650 ("Result when n is divided by the sum of its digits and the resulting integer is concatenated to the remainder"), that all integers will end either on a fixed point (the first ones are listed in A052224) or grow forever [10 is an example of a simple pattern: 10,100,1000,10000,100000,. . .]
The Crossrefs section gives two more interesting such infinite growing patterns.

Examples

			19 is the smallest integer leading to itself in 1 step because we have [19/10 = 10*1 + 9];
31 is the smallest integer ending on a fixed point in 2 steps because 31 leads to 73 [31/4 = 4*7 + 3] (step 1) and 73 to itself [73/10 = 10*7 + 3] (step 2);
13 is the smallest integer ending on a fixed point in 3 steps because 13 leads to 31 [13/4 = 4*3 + 1] (step 1) and 31 leads to 73 in 2 steps (see above);
16 is the smallest integer ending on a fixed point in 4 steps because 16 leads to 22 [16/7 = 7*2 + 2] (step 1), then 22 leads to 52 [22/4 = 4*5+2] (step 2), then 52 leads to 73 [52/7 = 7*7 + 3] (step 3) and 73 to itself [73/10 = 10*7 + 3] (step 4);
32 is the smallest integer ending on a fixed point in 5 steps [32,62,76,511,730];
11 is the smallest integer ending on a fixed point in 6 steps
  [11,51,83,76,511,730];
23 is the smallest integer ending on a fixed point in 7 steps
  [23,43,61,85,67,52,73];
Etc.
		

Crossrefs

Cf. A316650 (where the main idea is explained), A316679 (for the infinite growing pattern produced by 907) and A316680 (for the infinite growing pattern produced by 1358).

Programs

  • Mathematica
    Array[Block[{k = 1}, While[Count[#, 0] != 1 &@ Differences@ NestList[FromDigits@ Flatten[IntegerDigits@ # & /@ QuotientRemainder[#, Total[IntegerDigits@ #]]] &, k, #], k++]; k] &, 47] (* Michael De Vlieger, Jul 10 2018 *)

A368940 Number of iterations before a repeated value, or -1 if this never occurs, when starting at k = 1 and repeating k = k*n if k does not contain any adjacent equal digits, else k = k with all adjacent equal digits replaced by a single copy of the same digit.

Original entry on oeis.org

1, 86, 338, 816, 2031, 1570, 2637, 2392, 4790, 3, 2, 15199, 21136, 8124, 12360, 18210, 101998, 41798, 15250, 135, 40063, 27298, 176470, 6553, 15757, 5031, 187645, 24050, 567055, 487, 141008, 71243, 341907, 154758, 38175, 150429, 84011, 106833, 351884, 1117, 391266, 324631, 1287699, 374743
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, Jan 10 2024

Keywords

Comments

The largest term in the first 140 terms is a(127) = 121311726, which reaches a maximum value of 133672219006681613318653118648140533992241 at the 17276871st iteration, before repeating 2102014745703.

Examples

			a(2) = 86 as the iterations are : 1 -> 2 -> 4 -> 8 -> 16 -> 32 -> 64 -> 128 -> 256 -> 512 -> 1024 -> 2048 -> 4096 -> 8192 -> 16384 -> 32768 -> 65536 -> 6536 -> 13072 -> 26144 -> 2614 -> 5228 -> 528 -> 1056 -> 2112 -> 212 -> 424 -> 848 -> 1696 -> 3392 -> 392 -> 784 -> 1568 -> 3136 -> 6272 -> 12544 -> 1254 -> 2508 -> 5016 -> 10032 -> 1032 -> 2064 -> 4128 -> 8256 -> 16512 -> 33024 -> 3024 -> 6048 -> 12096 -> 24192 -> 48384 -> 96768 -> 193536 -> 387072 -> 774144 -> 7414 -> 14828 -> 29656 -> 59312 -> 118624 -> 18624 -> 37248 -> 74496 -> 7496 -> 14992 -> 1492 -> 2984 -> 5968 -> 11936 -> 1936 -> 3872 -> 7744 -> 74 -> 148 -> 296 -> 592 -> 1184 -> 184 -> 368 -> 736 -> 1472 -> 2944 -> 294 -> 588 -> 58 -> 116 -> 16, taking 86 steps to reach a repeated value.
a(10) = 3 as the iterations are : 1 -> 10 -> 100 -> 10, taking three steps to reach a repeated value.
a(11) = 2 as the iterations are : 1 -> 11 -> 1, taking two steps to reach a repeated value.
		

Crossrefs

Programs

  • Python
    from itertools import groupby
    def a(n):
        seen, k, c = set(), 1, 0
        while k not in seen:
            seen.add(k)
            c += 1
            s = str(k)
            t = "".join(k for k, g in groupby(s))
            k = k*n if s == t else int(t)
        return c
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jan 11 2024

A340744 Primes in A340618, in the order in which they occur.

Original entry on oeis.org

31, 23, 19, 43, 73, 53, 43, 37, 61, 43, 83, 73, 43, 73, 53, 67, 79, 73, 61, 59, 173, 151, 109, 223, 163, 109, 127, 109, 109, 233, 109, 109, 163, 139, 113, 109, 109, 181, 109, 109, 523, 353, 199, 383, 331, 199, 223, 313, 199, 173, 163, 271, 229, 211, 199, 199, 751, 503, 433, 307, 229, 313, 2411
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 18 2021

Keywords

Examples

			a(4) = A316650(23) = 43 is the fourth term in A316650 that is prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local a, b, c,p;
      c:= convert(convert(n, base, 10), `+`);
      a:= floor(n/c);
      b:= n mod c;
      p:= 10^(1+ilog10(b))*a+b;
      if isprime(p) then p fi;
    end proc:
    map(f, [$1..1000]);

Formula

a(n) = A316650(A340618(n)).
Showing 1-6 of 6 results.