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-10 of 23 results. Next

A333546 Records in A332580.

Original entry on oeis.org

1, 80, 1885, 6838, 124518, 2783191412912
Offset: 1

Views

Author

N. J. A. Sloane, Apr 30 2020

Keywords

Comments

The next term probably arises from A332580(158), which is known to be greater than 10^14 (or -1, which would not count as a record).

Crossrefs

A333547 Indices of records in A332580.

Original entry on oeis.org

1, 2, 3, 4, 18, 44
Offset: 1

Views

Author

N. J. A. Sloane, Apr 30 2020

Keywords

Comments

The next term is almost certainly 158 (see the Myers et al. link).

Crossrefs

A332558 a(n) is the smallest k such that n*(n+1)*(n+2)*...*(n+k) is divisible by n+k+1.

Original entry on oeis.org

4, 3, 2, 3, 4, 5, 4, 3, 5, 4, 6, 5, 6, 5, 4, 7, 6, 5, 4, 3, 6, 7, 6, 5, 4, 8, 7, 6, 6, 5, 8, 7, 6, 5, 4, 8, 7, 6, 5, 7, 6, 5, 10, 9, 8, 9, 8, 7, 6, 9, 8, 7, 6, 5, 4, 6, 12, 11, 10, 9, 8, 7, 6, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5
Offset: 1

Views

Author

Keywords

Comments

This is a multiplicative analog of A332542.
a(n) always exists because one can take k to be 2^m - 1 for m large.

Crossrefs

Cf. A061836 (k+1), A332559 (n+k+1), A332560 (the final product), A332561 (the quotient).
For records, see A333532 and A333533 (and A333537), which give the records in the essentially identical sequence A061836.
Additive version: A332542, A332543, A332544, A081123.
"Concatenate in base 10" version: A332580, A332584, A332585.

Programs

  • Maple
    f:= proc(n) local k,p;
      p:= n;
      for k from 1 do
        p:= p*(n+k);
        if (p/(n+k+1))::integer then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 25 2020
  • Mathematica
    a[n_] := Module[{k, p = n}, For[k = 1, True, k++, p *= (n+k); If[Divisible[p, n+k+1], Return[k]]]];
    Array[a, 100] (* Jean-François Alcover, Jun 04 2020, after Maple *)
  • PARI
    a(n) = {my(r=n*(n+1)); for(k=2, oo, r=r*(n+k); if(r%(n+k+1)==0, return(k))); } \\ Jinyuan Wang, Feb 25 2020
    
  • PARI
    \\ See Corneth link
    
  • Python
    def a(n):
        k, p = 1, n*(n+1)
        while p%(n+k+1): k += 1; p *= (n+k)
        return k
    print([a(n) for n in range(1, 85)]) # Michael S. Branicky, Jun 06 2021

Formula

a(n) = A061836(n) - 1 for n >= 1.
a(n + 1) >= a(n) - 1. a(n + 1) = a(n) - 1 mostly. - David A. Corneth, Apr 14 2020

A029455 Numbers k that divide the (right) concatenation of all numbers <= k written in base 10 (most significant digit on left).

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 12, 15, 18, 20, 25, 27, 30, 36, 45, 50, 54, 60, 69, 75, 90, 100, 108, 120, 125, 135, 150, 162, 180, 200, 216, 225, 248, 250, 270, 300, 324, 360, 375, 405, 450, 470, 500, 540, 558, 600, 648, 675, 710, 750, 810, 900, 1000, 1053, 1080, 1116
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that k divides A007908(k).

Examples

			k = 13 is not a term since 12345678910111213 is not divisible by 13.
		

Crossrefs

Cf. A007908.
See A171785 for numbers that divide the concatenation of a(1) through a(n).

Programs

  • Mathematica
    b = 10; c = {}; Select[Range[10^5], Divisible[FromDigits[c = Join[c, IntegerDigits[#, b]], b], #] &] (* Robert Price, Mar 11 2020 *)
    Select[Range[1200],Divisible[FromDigits[Flatten[IntegerDigits/@Range[#]]],#]&] (* Harvey P. Dale, Dec 31 2020 *)
    nxt[{rc_,n_}]:={rc*10^IntegerLength[n+1]+n+1,n+1}; Select[NestList[nxt,{1,1},1200],Mod[#[[1]],#[[2]]]==0&][[;;,2]] (* Harvey P. Dale, Sep 26 2023 *)
  • PARI
    c=0;for(d=1,1e9,for(n=d,-1+d*=10,(c=c*d+n)%n || print1(n","));d--) \\ M. F. Hasler, Sep 11 2011
    
  • Python
    A029455_list, r = [], 0
    for n in range(1,10**4+1):
        r = r*10**len(str(n))+n
        if not (r % n):
            A029455_list.append(n) # Chai Wah Wu, Nov 05 2014
    
  • Python
    def concat_mod(base, k, mod):
      total, digits, n1 = 0, 1, 1
      while n1 <= k:
        n2, p = min(n1*base-1, k), n1*base
        # Compute ((p-1)*n1+1)*p**(n2-n1+1)-(n2+1)*p+n2 divided by (p-1)**2.
        # Since (a//b)%mod == (a%(b*mod))//b, compute the numerator mod (p-1)**2*mod.
        tmp = pow(p, n2-n1+1, (p-1)**2*mod)
        tmp = ((p-1)*n1+1)*tmp-(n2+1)*p+n2
        tmp = (tmp%((p-1)**2*mod))//(p-1)**2
        total = (total*pow(p, n2-n1+1, mod)+tmp)%mod
        digits, n1 = digits+1, p
      return total
    for k in range(1, 10**10+1):
      if concat_mod(10, k, k) == 0: print(k) # Jason Yuen, Jan 27 2024

A339144 a(n) is the smallest positive integer such that n*a(n) contains n+a(n) as a substring. If no such number exists then a(n) = -1.

Original entry on oeis.org

-1, 2, -1, 68, -1, -1, -1, 44, -1, 890, 110, 60, 44, 35, 30, 27, 25, 23, 22, 20, 929, 19, 18, 88, 17, -1, 16, 16, 68, 15, 15, 60, 58, 56, 14, 14, 14, 371, 48, 360, 336, 562, 9104, 8, 13, 13, 283, 39, 269, 450, 37, 452, 245, 18, 679, 34, 225, 33, 2053, 12, 12, 12, 12, 12, 30, 369, 889, 4, 16961
Offset: 1

Views

Author

Scott R. Shannon, Nov 25 2020

Keywords

Comments

For n = 1, 3, 5, 6, 7, 9, 26 no value has been found for which n*a(n) contains n + a(n) as a substring (obviously true for n = 1) for a(n) up to 5x10^10. It is likely, although unproven, that this is the complete list of values for which a(n) = -1.
The sequence values display erratic behavior. Most of the term values appear random but there are ranges of n values with the same value. The largest such range for the first one million terms is a(501000) to a(501499), 500 terms, all of which have a(n) = 1002. Patterns also appear for n value corresponding to multiples of powers-of-ten. For example if n=10^k then a(n) = 89*10^k. The largest value in the first one million terms is a(554635) = 879948670.

Examples

			a(2) = 2 as 2*2 = 4 which contains 2 + 2 = 4 as a substring.
a(4) = 68 as 4*68 = 272 which contains 4+68 = 72 as a substring.
a(69) = 16961 as 69*16961 = 1170309 which contains 69+16961 = 17030 as a substring.
a(501000) = 1002 as 501000*1002 = 502002000 which contains 501000+1002 = 502002 as a substring. This is the first of 500 consecutive terms with a(n) = 1002.
a(554635) = 879948670 as 554635*879948670 = 488050330585450 which contain 554635+879948670 = 880503305 as a substring. This is the largest value of a(n) for the first one million terms.
		

Crossrefs

Programs

  • PARI
    isok(n, k) = #strsplit(Str(n*k), Str(n+k)) > 1;
    a(n) = {if (vecsearch([1, 3, 5, 6, 7, 9, 26], n), return (-1)); my(k=1); while (! isok(k, n), k++); k;} \\ Michel Marcus, Dec 02 2020 and Jan 23 2021

A332584 a(n) = minimal value of n+k (with k >= 1) 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 n+k exists.

Original entry on oeis.org

2, 82, 1888, 6842, 6, 50, 20, 10, 1320, 28, 208, 32, 66, 148, 1008, 60, 192, 124536, 282, 46, 128, 32, 28, 86, 40, 33198, 36, 42, 346, 738, 1532, 246, 70, 68, 102, 306, 56, 20226, 78316, 10778, 328, 2432, 738, 2783191412956, 48, 746, 8350, 398, 70, 150, 2300, 21378
Offset: 1

Views

Author

Keywords

Comments

Certainly a(n) must be even, since no odd number can be divisible by an even number.
The values of k = a(n)-n are given in the companion sequence A332580, which also has an extended table of values.
A heuristic argument suggests that n+k should always exist.

Examples

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

Crossrefs

Cf. A061836 (multiplication instead of concatenation), A332580, A332585.

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( {A332584(n,L=10^#Str(n),c=n)= until((c=c*L+n)%(n+1)==0, n++M. F. Hasler, Feb 20 2020
    
  • Python
    def A332584(n):
        r, m = n, n + 1
        while True:
            r = r*10**(len(str(m))) + m
            if m % 2 == 0 and r % (m+1) == 0:
                return m
            m += 1 # Chai Wah Wu, Jun 12 2020

Formula

a(n) = n + A332580(n) (trivially from the definitions).

Extensions

a(44) onwards (using A332580) added by Andrew Howroyd, Jan 02 2024

A332563 a(n) = minimal positive k 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 k exists.

Original entry on oeis.org

1, 6, 253, 160, 23, 6, 577, 14, 1, 4, 383, 8, 1591, 18, 169, 42, 1879, 210, 57, 20, 69, 1354, 13, 86, 225, 1532, 577, 300, 13, 30, 6419, 312, 30639, 12, 151, 8, 89, 2720, 29, 5830, 1, 1450, 195, 478, 55, 166528, 127, 1074, 3559, 252, 41
Offset: 1

Views

Author

Keywords

Comments

A base 2 analog of A332580.
For n up to 1000 the presently unknown values are a(213) and a(743).

Crossrefs

A110740 Numbers k such that the concatenation 1,2,3,...,(k-1) is divisible by k.

Original entry on oeis.org

1, 3, 9, 27, 69, 1053, 1599, 2511, 8167, 21371, 73323, 225681, 313401, 362703, 371321, 1896939, 2735667, 3426273, 3795093, 5433153, 302278903, 1371292077, 19755637749, 23560349643, 33184178631
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2005

Keywords

Comments

Subsequence of A029455 composed of the terms coprime to 10. - Max Alekseyev, Jun 07 2023
a(26) > 10^11. - Jason Yuen, Oct 12 2024

Examples

			3 divides 12, 9 divides 12345678.
		

Crossrefs

Programs

  • Mathematica
    s = ""; Do[s = s <> ToString[n]; If[Mod[ToExpression[s], n + 1] == 0, Print[n + 1]], {n, 0, 5*10^6}] (* Ryan Propper, Aug 28 2005 *)
    Select[Range[55*10^5],Divisible[FromDigits[Flatten[IntegerDigits/@Range[ #-1]]],#]&] (* Harvey P. Dale, Mar 28 2020 *)
  • Python
    # See A029455 for concat_mod
    def isok(k): return concat_mod(10, k-1, k)==0 # Jason Yuen, Oct 06 2024

Extensions

More terms from Ryan Propper, Aug 28 2005
a(20) from Giovanni Resta, Apr 10 2018
a(21)-a(24) from Scott R. Shannon, using a modified version of an algorithm by Joseph Myers, Apr 10 2020
a(25) from Jason Yuen, Oct 06 2024

A339403 a(n) is the smallest positive integer such that n*a(n) contains the string n+a(n) in reverse as a substring. If no such number exists then a(n) = -1.

Original entry on oeis.org

0, -1, 2, 24, 37, 26, 34, 35, 57, 9, -1, 12, 11, 45, 193, 228, 28, 51, 23, 44, 841, 11, 27, 18, 3, 626, 5, 22, 16, 46716, 56, 41, 33, 32, 6, 7, 21, 4, 3, 24, 592, 31, 7, 619, 19, 13, 38, 2, 117, 5, 463, 17, 34, 308, 33, 36, 30, 8, 31, 4, 23, 21, 648, 124, 921, 903, 386, 395, 4, 334, 755, 31, 563
Offset: 0

Views

Author

Scott R. Shannon, Dec 03 2020

Keywords

Comments

This is a variation of A339144 where, instead of the n*a(n) containing n+a(n) as a substring, it contains the reverse of the string n+a(n), including any leading zeros.
Based on a search limit of 5x10^9 up to n = 100000 the values of n for which no a(n) is found are n = 10^k, with k>=0, and 17500. A test of 175000 and 1750000 also found no a(n) indicating that all values of the form 17500*10^k may have no term for a(n).
It is found that when n = 200*10^k, with k>=0, the corresponding value for a(n) is significantly larger than neighboring terms. As an example a(20000) = 666843331, which is the largest term up to n = 100000.
Unlike A339144, which contains multiple consecutive terms with the same value of a(n), in this sequence the largest consecutive run of the same a(n) in the first 100000 terms is only two. The first term of these pairs occurs at n = 110, 121, 2717, 4368, 7916, 10100, 11211, 13231, 17271, 44573, 63529.

Examples

			a(3) = 24 as 3*24 = 72 which contains reverse(3+24) = reverse(27) = 72 as a substring.
a(6) = 34 as 6*34 = 204 which contains reverse(6+34) = reverse(40) = 04 as a substring. Note the leading zero is included.
a(29) = 46716 as 29*46716 = 1354764 which contains reverse(29+4671) = reverse(46745) = 54764 as a substring.
a(110) = 11 as 110*11 = 1210 which contains reverse(110+11) = reverse(121) = 121 as a substring. This is the first of two consecutive terms with a(n) = 11.
a(20000) = 666843331 as 20000*666843331 = 13336866620000 which contains reverse(20000+666843331) = reverse(666863331) = 133368666 as a substring. This is the largest value in the first 100000 terms.
		

Crossrefs

Programs

  • PARI
    isok(n, k) = #strsplit(Str(n*k), concat(Vecrev(Str(n+k)))) > 1;
    ispt(n) = my(t); ispower(n,,&t) && (t==10);
    a(n) = {if ((n==1) || (n==10) || ispt(n), return (-1)); my(k=0); while (! isok(n, k), k++); k;} \\ Michel Marcus, Jan 22 2021

A360297 a(n) = minimal positive k such that the sum of the primes prime(n) + prime(n+1) + ... + prime(n+k) is divisible by prime(n+k+1), or -1 if no such k exists.

Original entry on oeis.org

1, 3, 7, 11, 26, 20, 27, 52, 1650, 142, 53, 168234, 212, 7, 13
Offset: 1

Views

Author

Scott R. Shannon, Feb 02 2023

Keywords

Comments

In the first 100 terms there are twenty values for which a(n) is currently unknown; for all of these values a(n) is at least 10^9. These unknown terms are for n = 16, 22, 24, 34, 41, 42, 45, 48, 50, 54, 55, 62, 68, 70, 72, 75, 80, 87, 88, 98. In this same range the largest known value is a(76) = 749597506, where prime(76) = 383 leads to a sum of primes of 6173644601523754801 that is divisible by 16865554301.
See A360311 for the sum of the k+1 primes. See A360312 for prime(n+k+1).
a(16) > 10^10. - Michael S. Branicky, Feb 19 2025
a(16) > 10^12. - Michael S. Branicky, Apr 22 2025

Examples

			a(1) = 1 as prime(1) + prime(2) = 2 + 3 = 5, which is divisible by prime(3) = 5.
a(4) = 11 as prime(4) + ... + prime(15) = 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 = 318, which is divisible by prime(16) = 53.
		

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360297(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p+q, 1
        while s%(q:=nextprime(q)):
            k += 1
            s += q
        return k # Chai Wah Wu, Feb 03 2023
Showing 1-10 of 23 results. Next