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

A128856 Index of first appearance of n in A062347.

Original entry on oeis.org

0, 1, 71, 21, 45, 12, 64, 6, 5, 280, 11, 121, 638185, 62, 8, 76, 9, 7, 10
Offset: 1

Views

Author

Zak Seidov, Apr 16 2007, revised Apr 17 2007

Keywords

Comments

a(20) > pi(10^7)=664579

Formula

a(n) = smallest m such that A062347(m)=n.

Extensions

More terms from Max Alekseyev, Apr 20 2007

A102647 a(n) = product of the remainders when the n-th prime is divided by primes up to the (n-1)-st prime.

Original entry on oeis.org

1, 1, 2, 2, 8, 36, 288, 1920, 2880, 120960, 362880, 6386688, 34836480, 217728000, 3881779200, 275904921600, 1785411403776, 28217548800000, 608662978560000, 3492203839488000, 964122158039040000, 2224367550332928000, 1314079960596480000000, 3758268687305932800000
Offset: 1

Views

Author

Hans Boelens (h.p.m.boelens(AT)pl.hanze.nl), Feb 02 2005

Keywords

Examples

			Prime(6) = 13, 13 mod 2 = 1, 13 mod 3 = 1, 13 mod 5 = 3, 13 mod 7 = 6, 13 mod 11 = 2 so a(6) = 1*1*3*6*2 = 36.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,i;
      p:= ithprime(n);
      mul(p mod ithprime(i),i=1..n-1)
    end proc:
    map(f, [$1..25]); # Robert Israel, Jan 12 2021
  • Mathematica
    f[n_] := Times @@ Mod[ Prime[n], Table[ Prime[i], {i, n - 1}]]; Table[ f[n], {n, 22}] (* Robert G. Wilson v, Feb 04 2005 *)
    Join[{0},Table[Times@@Mod[Prime[n],Prime[Range[n-1]]],{n,2,30}]] (* Harvey P. Dale, May 16 2019 *)
  • PARI
    a(n) = my(pr = 1, pn = prime(n)); forprime (q=1, precprime(pn-1), pr *= (pn % q)); pr; \\ Michel Marcus, Jan 12 2021

Extensions

More terms from Robert G. Wilson v, Feb 04 2005
a(1) (an empty product, therefore 1 by standard convention) corrected by N. J. A. Sloane, Jan 11 2021

A079276 Multiplicative inverse in the finite field F(prime(n)) of the product of the first n-1 primes modulo prime(n).

Original entry on oeis.org

1, 2, 1, 4, 1, 3, 15, 18, 20, 12, 18, 27, 7, 5, 43, 2, 4, 10, 38, 3, 60, 20, 53, 62, 52, 83, 11, 30, 27, 49, 113, 63, 79, 25, 81, 143, 80, 121, 53, 142, 81, 52, 81, 150, 136, 40, 176, 114, 167, 138, 84, 46, 239, 213, 137, 4, 122, 136, 255, 141, 273, 30, 22, 25, 179, 9, 43, 12
Offset: 1

Views

Author

Valentin F. Schmid (v_schmid(AT)hotmail.com), Feb 07 2003

Keywords

Comments

a(n)=1 if and only if n-1 is in A341805. - Jeppe Stig Nielsen, Feb 20 2021

Examples

			a(6)=3 because 2*3*5*7*11 = 2310, 2310 == 9 (mod 13) and 9*(9^(-1)) == 9*3 == 1 (mod 13).
		

Crossrefs

Programs

  • Maple
    a := n -> (1/mul(ithprime(j), j=1..n-1)) mod ithprime(n);
    seq(a(n), n=1..68); # Peter Luschny, Apr 13 2014
  • Mathematica
    a[n_] := Module[{i}, Return[PowerMod[Product[Prime[i], {i, 1, n - 1}], -1, Prime[n]]]; ];

Formula

a(1) = 1; for n>1, a(n) = ( prime(n-1)# (mod prime(n)) )^(-1), where prime(i) is the i-th prime number, prime(i)# is the product of first i primes, x^(-1) is the multiplicative inverse in the finite field F(prime(n)).

A338543 Numbers k such that 1 + Product_{i

Original entry on oeis.org

1, 2, 8, 233, 431
Offset: 1

Views

Author

Robert Israel, Nov 01 2020

Keywords

Comments

Numbers k such that A062347(k-1) == -1 (mod prime(k)).

Examples

			a(3)=8 is a term because 1 + 2*3*5*7*11*13*17 = 510511 is divisible by prime(8)=19.
		

Crossrefs

Programs

  • Maple
    select(t -> 1+mul(ithprime(i),i=1..t-1) mod ithprime(t)=0, [$1..1000]);
  • PARI
    isok(n) = ((1+vecprod(primes(n-1))) % prime(n)) == 0; \\ Michel Marcus, Nov 03 2020

Formula

a(n) = A081618(n)+1 for n >= 2.

A066909 (product of primes < n that do not divide n) (mod n).

Original entry on oeis.org

0, 1, 2, 3, 1, 5, 2, 1, 7, 1, 1, 1, 9, 3, 7, 7, 8, 17, 18, 9, 16, 15, 15, 1, 24, 1, 26, 13, 17, 1, 19, 9, 14, 23, 3, 23, 11, 31, 19, 1, 6, 37, 26, 21, 7, 45, 35, 35, 25, 41, 2, 17, 27, 1, 31, 43, 50, 41, 15, 49, 55, 9, 10, 51, 28, 37, 30, 13, 26, 47, 24, 13, 28, 27, 73, 73, 76, 43, 4
Offset: 1

Views

Author

Leroy Quet, Jan 22 2002

Keywords

Examples

			a(8) = (3 * 5 * 7) (mod 8) = 1 because 3, 5 and 7 are the primes < 8 that do not divide 8.
		

Crossrefs

Programs

  • PARI
    a(n) = prod(i=1, n-1, if (isprime(i) && (n%i) , i, 1)) % n; \\ Michel Marcus, May 20 2014

Formula

a(n) = A066838(n) modulo n. - Michel Marcus, May 20 2014
a(prime(n)) = A062347(n-1). - Michel Marcus, May 20 2014

A126147 a(n) = floor((Product_{k=1..n-1} prime(k))/prime(n)).

Original entry on oeis.org

0, 0, 1, 4, 19, 177, 1766, 26868, 421725, 7692857, 208699781, 5420553787, 180993613044, 7075587523888, 278356624078085, 11601694011103611, 552358618257458385, 31520661477937912115, 1750572856110551805720
Offset: 1

Views

Author

Leroy Quet, Mar 07 2007

Keywords

Comments

Every distinct prime dividing ((Product_{k=1..n-1} prime(k)) (mod prime(n))) also divides a(n).
Let Pn(n) = A002110(n) denote the primorial function. The number of natural numbers < Pn(n) that have prime(n+1) as a prime factor is equal to a(n). For example 19 numbers < Pn(4) = 210 have 11 as a prime factor. - Jamie Morken, Sep 18 2018

Crossrefs

Programs

  • Maple
    seq(floor(mul(ithprime(k),k=1..n-1)/ithprime(n)),n=1..20); # Muniru A Asiru, Sep 21 2018
  • Mathematica
    f[n_] := Floor[ Product[ Prime@k, {k, n - 1}] / Prime@n]; Array[f, 19] (* Robert G. Wilson v, Mar 07 2007 *)

Extensions

More terms from Robert G. Wilson v, Mar 07 2007

A340712 Primes p such that p divides (2 + product of primes < p).

Original entry on oeis.org

557, 248137, 4085791, 519807973
Offset: 1

Views

Author

Martin Ehrenstein, Jan 16 2021

Keywords

Examples

			557 is in the sequence because 2 + A034386(557 - 1) = 557 * 4627335992...5904782776 (220 digits).
		

Crossrefs

Programs

  • Python
    from sympy import nextprime
    def aupto(limit):
      p, psharp = 3, 2
      while p <= limit:
        if (psharp+2)%p == 0: print(p, end=", ")
        psharp, p = psharp*p, nextprime(p)
    aupto(500000) # Michael S. Branicky, Mar 24 2021

A371598 a(n) = (Product_{i=1..n} Fibonacci(i)) mod Fibonacci(n + 1).

Original entry on oeis.org

0, 1, 2, 1, 6, 6, 12, 2, 15, 16, 0, 49, 299, 220, 882, 252, 2176, 166, 495, 5720, 5251, 6065, 28224, 41650, 106947, 113288, 256737, 173841, 26840, 25379, 444150, 347278, 1834953, 8709610, 4046544, 2653673, 31127545, 47532000, 50717205, 147239197, 97769672, 37543458
Offset: 1

Views

Author

Adnan Baysal, Mar 29 2024

Keywords

Examples

			a(1) = 0 since A000045(1) = A000045(2) = 1 and 1 mod 1 = 0.
a(2) = (1 * 1) mod 2 = 1.
a(3) = (1 * 1 * 2) mod 3 = 2.
a(4) = (1 * 1 * 2 * 3) mod 5 = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Fibonorial[n], Fibonacci[n + 1]]; Array[a, 50] (* Amiram Eldar, Mar 29 2024 *)
  • PARI
    a(n) = my(f=fibonacci(n+1)); lift(prod(k=1, n, Mod(fibonacci(k), f))); \\ Michel Marcus, Apr 03 2024
  • Python
    from sympy import fibonacci
    def a(n):
        a_n = 1
        mod = fibonacci(n + 1)
        for i in range(1, n + 1):
            a_n = (a_n * fibonacci(i)) % mod
        return a_n
    

Formula

a(n) = A003266(n) mod A000045(n+1).
Showing 1-8 of 8 results.