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 10 results.

A332543 a(n) = n + A332542(n) + 1.

Original entry on oeis.org

6, 12, 20, 10, 14, 56, 24, 15, 22, 33, 39, 26, 21, 48, 272, 34, 38, 76, 28, 33, 46, 69, 40, 50, 39, 36, 116, 58, 62, 992, 96, 51, 70, 45, 111, 74, 57, 65, 205, 82, 86, 172, 55, 69, 94, 141, 112, 70, 75, 68, 212, 106, 66, 77, 133, 87, 118, 177, 183, 122
Offset: 3

Views

Author

Scott R. Shannon, Feb 18 2020

Keywords

Comments

Note that A332542 is well-defined for all n. - N. J. A. Sloane, Feb 20 2020

Examples

			See A332542.
		

Crossrefs

Programs

A332544 a(n) = (k+1)*n + k*(k+1)/2, where k = A332542(n).

Original entry on oeis.org

12, 60, 180, 30, 70, 1512, 240, 60, 176, 462, 663, 234, 105, 1008, 36720, 408, 532, 2660, 168, 297, 782, 2070, 480, 900, 390, 252, 6264, 1218, 1426, 491040, 4032, 714, 1820, 360, 5439, 1998, 855, 1300, 20090, 2460, 2752, 13760, 495, 1311, 3290, 8742
Offset: 3

Views

Author

Scott R. Shannon, Feb 18 2020

Keywords

Comments

Note that A332542 is well-defined for all n. - N. J. A. Sloane, Feb 20 2020

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

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

A360376 a(n) = minimal nonnegative k such that prime(n) * prime(n+1) * ... * prime(n+k) + 1 is divisible by prime(n+k+1), or -1 if no such k exists.

Original entry on oeis.org

0, 99, 14, 1, 2, 73, 33, 10, 137, 277856, 1
Offset: 1

Views

Author

Scott R. Shannon, Feb 04 2023

Keywords

Comments

Assuming a(12) exists it is greater than 2.25 million.

Examples

			a(1) = 0 as prime(1) + 1 = 2 + 1 = 3, which is divisible by prime(2) = 3.
a(3) = 14 as prime(3) * ... * prime(17) + 1 = 320460058359035439846, which is divisible by prime(18) = 61.
a(10) = 277856 as prime(10) * ... * prime(277866) + 1 = 645399...451368 (a number with 1701172 digits), which is divisible by prime(277867) = 3919259.
a(11) = 1 as prime(11) * prime(12) + 1 = 31 * 37 + 1 = 1148, which is divisible by prime(13) = 41.
		

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360376(n):
        p = prime(n)
        s, k = p, 0
        while (s+1)%(p:=nextprime(p)):
            k += 1
            s *= p
        return k # Chai Wah Wu, Feb 07 2023

A360311 The sum of the primes prime(n) + prime(n+1) + ... + prime(n+k) in A360297.

Original entry on oeis.org

5, 26, 124, 318, 1703, 1133, 2086, 7641, 10912775, 60927, 8764, 184252585101, 144329, 474, 1090
Offset: 1

Views

Author

Scott R. Shannon, Feb 03 2023

Keywords

Comments

See A360297 for further details.

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360311(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p+q, 1
        while s%(q:=nextprime(q)):
            k += 1
            s += q
        return s # Chai Wah Wu, Feb 06 2023

A360312 The dividing prime prime(n+k+1) in A360297.

Original entry on oeis.org

5, 13, 31, 53, 131, 103, 149, 283, 14081, 883, 313, 2281229, 1429, 79, 109
Offset: 1

Views

Author

Scott R. Shannon, Feb 03 2023

Keywords

Comments

See A360297 for further details.

Crossrefs

Programs

  • Python
    from sympy import prime, nextprime
    def A360312(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p+q, 1
        while s%(q:=nextprime(q)):
            k += 1
            s += q
        return q # Chai Wah Wu, Feb 06 2023

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

A360406 a(n) = minimal positive k such that prime(n) * prime(n+1) * ... * prime(n+k) - 1 is divisible by prime(n+k+1), or -1 if no such k exists.

Original entry on oeis.org

1, 1, 9, 14, 31, 826, 1, 34
Offset: 1

Views

Author

Scott R. Shannon, Feb 06 2023

Keywords

Comments

Assuming a(9) exists it is greater than 1.75 million.
a(11) = 692, a(12) = 8, a(13) = 792. - Robert Israel, Feb 22 2023

Examples

			a(1) = 1 as prime(1) * prime(2) - 1 = 2 * 3 - 1 = 5, which is divisible by prime(3) = 5.
a(2) = 1 as prime(2) * prime(3) - 1 = 3 * 5 - 1 = 14, which is divisible by prime(4) = 7.
a(3) = 9 as prime(3) * ... * prime(12) - 1 = 1236789689134, which is divisible by prime(13) = 41.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local P,k,p;
    P:= ithprime(n); p:= nextprime(P);
    for k from 0 to 10^6 do
      if P-1 mod p = 0 then return k fi;
      p:= nextprime(p);
     od;
    FAIL
    end proc:
    map(f, [$1..8]); # Robert Israel, Feb 22 2023
  • Python
    from sympy import prime, nextprime
    def A360406(n):
        p = prime(n)
        q = nextprime(p)
        s, k = p*q, 1
        while (s-1)%(q:=nextprime(q)):
            k += 1
            s *= q
        return k # Chai Wah Wu, Feb 06 2023
Showing 1-10 of 10 results.