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

A337137 Variant of A332563 - binary version of Recamán concatenation sequence.

Original entry on oeis.org

2, 1, 3, 3, 2, 1, 8, 4, 6, 3, 2, 3, 2, 1, 3, 15, 10, 13, 4, 3, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 27, 29, 28, 27, 26, 10, 24, 23, 22, 21, 20, 19, 3, 15, 14, 15, 14, 13, 12, 3, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 62, 13, 2, 27, 58, 16, 15, 55, 22, 2, 52, 51, 2, 36, 16, 3, 46, 33, 7, 43, 2, 5, 3, 23, 38, 33, 4, 3, 34, 33, 13, 7, 22, 29, 16, 3, 26, 22, 16, 7, 22, 17, 2, 3, 2, 17, 16, 9, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 128
Offset: 1

Views

Author

Olivier Gérard, Sep 14 2020

Keywords

Comments

Inspired by Neil Sloane's presentation at Rutgers' Experimental Mathematics Seminar (see the Links section).
In the original version (A332563), for a given n, one concatenate the binary representation of n||n+1||n+2||...||n+i until the corresponding number is divisible by n+i+1.
In this variant, one skips n+1 as an ingredient of the concatenation.
A337137(n) records the least i such that n||n+2||n+3||...||n+i is divisible by n+i+1.
This version is tamer than the one in A332563.
The scatterplot graph shows some interesting structures.

Crossrefs

Programs

  • Mathematica
    Module[{s, i, imax = 128},
    Table[ s = IntegerDigits[n, 2]; i = 0;
      While[Mod[FromDigits[s, 2], n + i + 1] > 0 && i <= imax, i = i + 1;
       s = Join[s, IntegerDigits[n + i + 1, 2]]];
      i /. {imax + 1 -> Infinity} , {n, 1, 127}]]

A332580 a(n) = minimal positive k such that the concatenation of the decimal digits of n,n+1,...,n+k is divisible by n+k+1, or -1 if no such k exists.

Original entry on oeis.org

1, 80, 1885, 6838, 1, 44, 13, 2, 1311, 18, 197, 20, 53, 134, 993, 44, 175, 124518, 263, 26, 107, 10, 5, 62, 15, 33172, 9, 14, 317, 708, 1501, 214, 37, 34, 67, 270, 19, 20188, 78277, 10738, 287, 2390, 695, 2783191412912, 3, 700, 8303, 350, 21, 100, 2249, 21326
Offset: 1

Views

Author

Keywords

Comments

Certainly n+k must be even, since no odd number can be divisible by an even number.
The values of n+k = n+a(n) are given in the companion sequence A332584.
A heuristic argument suggests that k should always exist.
As of Jul 10 2020, up to n = 1000 there are just two unknown values, a(158) and a(539).
The following remarks summarize program made during the first half of 2020.
On Feb 19 2020 Joseph Myers discovered that a(98) = 259110640. On Feb 20 2020 he reported that a(44) > 10^11 if it exists; a(92), a(158) and a(170) are all > 10^10 if they exist; a(494), a(539), a(563), a(761), a(854), a(944) and a(956) are all > 2*10^9 if they exist; and that he has found all the other values up to a(1000). - N. J. A. Sloane, Feb 23 2020.
Added Feb 26 2020: Joseph Myers has now checked all the numbers up to 1000 out to a limit of 10^11 (see link).
Update from Paul Zimmermann, Mar 17 2020: (Start)
I started a parallel program using the same algorithm as in Joseph Myers's "grow.c" program on the few sequences with unknown status in http://oeis.org/A332580/a332580_2.txt.
This program just found:
pzimmermann@wurst:~/A332580$ tail 956.out
n=956 kmax=200000000000
found k=162236437060
It thus seems that a(956) = 162236437060, i.e., the term of index n+k+1 is divisible by 162236438017 = 43 * 5051 * 746969. (End)
Partial confirmation from Scott R. Shannon, Mar 17 2020: I set n = 956 and a k value a few less than 162236437060 in my Java version of Joseph Myer's program, and it found the results Paul Zimmermann gave. But that’s not much of a confirmation as it uses the same algorithm, just implemented in a different language.
Partial confirmation from Pierrick Gaudry, Mar 18 2020: (Start)
I ran the attached small C program in order to check that a(956) = 162236437060. More precisely, I check only that the 162236437060-th integer obtained starting with 956 is indeed 0 modulo 162236438017.
For this there is no need to rely on multi-precision arithmetic. However, since 162236438017 > 2^32, it is not possible to use 64-bit arithmetic; or at least, it was easier to use the 128-bit arithmetic provided by the compiler.
The algorithm is then fairly simple: just compute iteratively the big number obtained by concatenating 956, 957, 958, ... and so on, and reduce all along the way modulo 162236438017. The result should be zero. This was tested on a few other known example.
After a bit more than 1 hour on my laptop, this indeed prints 0, thus confirming that a(956) <= 162236437060 (this simple method does not check if there is a smaller value). (End)
Full confirmation for a(956) from Joseph Myers, Mar 18 2020: I restarted computations for 956 where I had stopped them before (at 101 * 10^9) and ran them up to 163 * 10^9; I also get 162236437060.
Update from Paul Zimmermann, Mar 22 2020: (Start)
Here are four more values to check, confirmed independently by Pierrick Gaudry:
a(44) <= 2783191412912
a(92) <= 218128159460
a(494) <= 2314160375788
a(854) <= 440578095296 (also k=587470935254 divides)
All four values were found with the "sieving" algorithm I described in an earlier email (see the Alekseyev et al. paper), sieving all primes up to 5000000000. Thus it is possible that smaller solutions exist.
Up to n=1000, the remaining cases where we have no bound at present are 158, 539, 761, 944. (End)
a(761) <= 111508066823971. Now only 3 values remain up to n=1000 (158, 539, 944). Paul Zimmermann, Mar 23 2020
I restarted my exhaustive search for 92 where I had previously stopped it, and can confirm a(92) = 218128159460. - Joseph Myers, Mar 23 2020
The remaining values to check are:
a(44) <= 2783191412912, a(494) <= 2314160375788, a(761) <= 111508066823971, a(854) <= 440578095296. - Paul Zimmermann, Mar 24 2020
a(854) = 440578095296 confirmed by Joseph Myers on Mar 26 2020.
Summary: As of Apr 15 2020, a(n) is known for all n <= 1000 except for four values where we have only an upper bound (44, 494, 539, and 761), and two values (158, 944) where all we know is that if k exists then it is greater than 10^15. See the table in the Links section. - Joseph Myers and Paul Zimmermann.
From Paul Zimmermann, Apr 17 2020: I have completed the full check for n=494 up to n+k=10^12. Thus a(494) >= 10^12-494. It took about 4 hours. The final check from 10^12 to 2314160375788+494+1 should take another 4-5 hours. (I don't want this comment to be lost, even though it will probably be replaced by something stronger very soon. - N. J. A. Sloane, Apr 17 2020)
From Paul Zimmermann, Apr 18 2020: (Start)
I confirm that a(44) = 2783191412912 and a(494) = 2314160375788. These were checked with a parallel version of Joseph's program (attached). For n=44 I ran the following script which submits 28 jobs checking each a range of 10^11 values:
for i in `seq 0 27`; do
kmin=`expr 1 + $i \* 100000000000`
kmax=`expr $kmin + 100000000000 - 1`
oarsub -p "cluster='grvingt'" -q production -l walltime=5 "./A332580 -kmin $kmin 44 $kmax"
done
The last job took a little less than 4 hours (wall clock time) on a 32-core cpu (64 virtual cores), thus it took a total of about 300 cpu days. (End)
a(944) <= 1032422879252. - Paul Zimmermann, Apr 19 2020

Examples

			a(1) = 1 as '1' || '2' = '12', which is divisible by 3 (where || denotes decimal concatenation).
a(2) = 80: the concatenation 2 || 3 || ... || 82 is
  23456789101112131415161718192021222324252627282930313233343536373839\
  40414243444546474849505152535455565758596061626364656667686970717273747\
  576777879808182, which is divisible by 83.
a(7) = 13 as '7' || '8' || '9' || '10' || '11' || '12' ||  ... || '20' = 7891011121314151617181920, which is divisible by 21.
a(8) = 2 as '8' || '9' || '10' = 8910, which is divisible by 11.
		

Crossrefs

Cf. A061836 (multiplication instead of concatenation), A281232, A332584, A332585 (length of the final concatenation). See A058183 for finding the length of a concatenation.
For records see A333546, A333547.
For n=44, see A332562.
See A332563, A332586 for a base 2 version.
See A281232 for the positions of the 1's.
A029455 is an older sequence in the same spirit.

Programs

  • Maple
    grow := proc(n,M) # searches out to a limit of M, returns [n,n+k] or [n,-1] if no k was found
      local R,i;
      R:=n;
      for i from n+1 to M do
        R:=R*10^length(i)+i;
        if (i mod 2) = 0 then
          if (R mod (i+1)) = 0 then return([n, i]); fi;
        fi;
      od:
      [n, -1];
    end;
    for n from 1 to 100 do lprint(grow(n,20000)); od;
  • PARI
    apply( {a(n,L=10^logint(n*10,10),c=n)= n%2||c=c*L+n+1; for(k=n+++n%2,oo, kM. F. Hasler, Feb 20 2020

Extensions

Edited by Max Alekseyev, Dec 26 2024

A332586 a(n) = minimal value of n+k+1 such that the concatenation of the binary expansions of n,n+1,...,n+k is divisible by n+k+1, or -1 if no such n+k+1 exists.

Original entry on oeis.org

3, 9, 257, 165, 29, 13, 585, 23, 11, 15, 395, 21, 1605, 33, 185, 59, 1897, 229, 77, 41, 91, 1377, 37, 111, 251, 1559, 605, 329, 43, 61, 6451, 345, 30673, 47, 187, 45, 127, 2759, 69, 5871, 43, 1493, 239, 523, 101, 166575, 175, 1123, 3609, 303, 93, 1139465, 4495201
Offset: 1

Views

Author

Keywords

Comments

For n up to 128 the presently unknown values are a(52) and a(53). If these values of k exist, they are at least 1000000.

Crossrefs

Programs

  • Mathematica
    Table[k=0;While[Mod[FromDigits[Flatten@IntegerDigits[Range[n,n+ ++k],2],2],n+k+1]!=0];n+k+1,{n,20}] (* Giorgos Kalogeropoulos, Apr 27 2021 *)

Extensions

a(52) from Michael S. Branicky, Apr 25 2021
a(53) from Michael S. Branicky, Apr 28 2021

A333687 a(n) is the minimal value of k >= 0, such that the concatenation of the decimal digits of n,n+1,...,n+k is divisible by the digit sum of the concatenation, or -1 if no such k is known.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 2, 42, 4, 3, 0, 1, 0, 0, 1, 17, 0, 131, 26, 0, 16, 11, 0, 1, 2, 37, 1, 1, 0, 1, 2, 21, 0, 3, 0, 7, 8, 0, 6, 83, 0, 1, 0, 89, 8, 26, 0, 97, 142783940, 3, 1, 1, 0, 4, 8, 0, 14, 37, 49994, 380, 20, 17, 0, 65, 0, 62, 1, 3, -1, 29, 46, 235, 0, 0, 18, 29, 0, 1, 53
Offset: 1

Views

Author

Scott R. Shannon, Apr 02 2020

Keywords

Comments

As with A332580 a heuristic argument based on the divergent sum of reciprocals which approximates the probability that the digit sum of the concatenation of n+1,n+2,...,n+k will divide the concatenation suggests that k should always exist. However in the first one thousand terms there are currently fourteen terms which are unknown and have a k value of at least 10^9. These are n = 76, 250, 273, 546, 585, 663, 695, 744, 749, 760, 790, 866, 867, 983. The largest known k value in this range is k = 600747353 for n = 693, which has a corresponding digit sum of 23123615211.
See the companion sequence A333830 for the corresponding digit sum for each value of n.
The author acknowledges Joseph Myers whose algorithm to find terms in A332580 was modified and used to find the large k values in this sequence.

Examples

			a(1) = 0 as 1 is divisible by its digit sum 1 so no concatenation of additional numbers is required. This is also true for n = 2 to 10.
a(11) = 2 as 11 requires the concatenation of two more numbers, 12 and 13, to form 111213, which is divisible by its digit sum 9.
a(12) = 0 as 12 is divisible by its digit sum 3.
a(16) = 4 as 16 requires the concatenation of four more numbers, 17,18,19 and 20, to form 1617181920, which is divisible by its digit sum 36.
		

Crossrefs

A333830 a(n) is the digit sum of the concatenation of the decimal digits of n,n+1,...,n+k, where k >= 0 and minimal, such that the concatenation is divisible by its digit sum, or -1 if no such sum is known.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 9, 3, 9, 18, 333, 36, 29, 9, 12, 2, 3, 9, 135, 6, 1218, 216, 9, 126, 90, 3, 9, 18, 355, 15, 17, 9, 21, 27, 198, 4, 26, 6, 75, 81, 9, 64, 810, 12, 18, 5, 855, 90, 297, 9, 936, 5050737477, 45, 27, 20, 6, 45, 99, 9, 174, 446, 1000260, 4209
Offset: 1

Views

Author

Scott R. Shannon, Apr 07 2020

Keywords

Comments

A heuristic argument, see the companion sequence A333687, suggests that the digit sum should always exist. Also see A333687 for the corresponding values of k for each digit sum and for details of the currently unknown terms.
The first escape value is a(76) = -1. - Georg Fischer, Jul 16 2020

Examples

			a(1) = 1 as the digit sum 1 divides 1 itself. Similarly a(2),...,a(9) equal 2,...,9 respectively.
a(10) = 1 as the digit sum of 10 is 1 which divides 10.
a(11) = 9 as A333687(11) = 2 giving the decimal concatenation 111213 which has a digit sum of 9.
a(16) = 36 as A333687(16) = 4 giving the decimal concatenation 1617181920 which has a digit sum of 36.
		

Crossrefs

Showing 1-5 of 5 results.