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.

Previous Showing 21-23 of 23 results.

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

A263623 a(1)=1; thereafter, a(n) = smallest k such that the decimal concatenation [a(n-2)+1 a(n-2)+2, ... a(n-1)] divides the decimal concatenation [a(n-1)+1 a(n-1)+2 ... k].

Original entry on oeis.org

1, 2, 4, 8, 36
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Comments

a(6), if it exists, is > 10^6. - Lars Blomberg, Dec 01 2016
a(6) <= 86794654347484748866500883685475458354620023089553379437308257589024531796179370608623026912768. - Max Alekseyev, Dec 25 2024

Examples

			n=3: a(3) = 4 because k=4 is the smallest number such that 2 divides the concatenation 345...k.
n=4: a(4) = 8 because k=8 is the smallest number such that 34 divides the concatenation 567...k. See A002782 for the relevant concatenations.
		

Crossrefs

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}]]
Previous Showing 21-23 of 23 results.