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.

A165657 Numerators of A002110 divided by A102647, starting from the second term of both.

Original entry on oeis.org

2, 3, 15, 105, 385, 5005, 17017, 323323, 1062347, 30808063, 434113615, 35336848261, 1448810778701, 33545541876077, 266186053068611, 5426100312552455, 9156001667401012567, 42962777054727828199
Offset: 1

Views

Author

Creighton Dement, Sep 24 2009

Keywords

Crossrefs

Programs

  • PARI
    a1(n)=prod(i=1, n, prime(i)); b1(n)=prod(i=1, n, prime(n+1)%prime(i));
    a(n)=if(n<0, 0, numerator(a1(n)/b1(n))); for(n=1, 20, print1(a(n) ", "))

A165658 Denominators of A002110 divided by A102647, starting from the second term of both.

Original entry on oeis.org

1, 1, 1, 4, 6, 48, 64, 96, 576, 1728, 13824, 165888, 1036800, 9953280, 119439360, 297271296, 134369280000, 222953472000, 75246796800, 32105299968000, 229323571200, 568865783808000000, 125150472437760000, 6129819058176000
Offset: 1

Views

Author

Creighton Dement, Sep 24 2009

Keywords

Crossrefs

Programs

  • PARI
    a1(n)=prod(i=1, n, prime(i));
    b1(n)=prod(i=1, n, prime(n+1)%prime(i));
    a(n)=if(n<0, 0, denominator(a1(n)/b1(n)));
    for(n=1, 25, print1(a(n) ", "))

A062347 a(n) = (product of first n primes) modulo prime(n+1).

Original entry on oeis.org

1, 2, 1, 2, 1, 9, 8, 18, 15, 17, 19, 11, 6, 26, 35, 27, 15, 55, 30, 24, 28, 4, 47, 56, 28, 28, 75, 25, 105, 30, 9, 52, 111, 89, 46, 132, 53, 97, 104, 106, 42, 94, 158, 184, 155, 5, 6, 45, 87, 78, 86, 26, 120, 33, 242, 66, 86, 2, 214, 2, 198, 127, 14, 112, 7, 141, 77, 309
Offset: 0

Views

Author

Henry Bottomley, Jul 06 2001

Keywords

Examples

			a(4)=1 since 2*3*5*7 = 210 = 19*11 + 1.
		

Crossrefs

Programs

  • Mathematica
    Mod[ #[ [ 1 ] ], #[ [ 2 ] ] ]&/@ Transpose[ {FoldList[ Times, 1, Prime[ Range[ 70 ] ] ], Prime[ Range[ 71 ] ]} ]
    Join[{1},Module[{nn=70,prs},prs=Prime[Range[nn]];Table[Mod[Fold[Times,Take[prs,n-1]],prs[[n]]],{n,2,nn}]]] (* Harvey P. Dale, Jun 30 2024 *)
  • PARI
    { n=-1; f=1; forprime (p=2, prime(1001), write("b062347.txt", n++, " ", f%p); f*=p ) } \\ Harry J. Smith, Aug 05 2009
    
  • Python
    from sympy import sieve, primorial
    print([1] + [primorial(k) % sieve[k+1] for k in range(1, 71)])
    # Karl-Heinz Hofmann, Jan 26 2022

Formula

a(n) = A051126(A002110(n), A000040(n+1)).

A173655 Triangle read by rows: T(n,k) = prime(n) mod prime(k), 0 < k <= n.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Nov 24 2010

Keywords

Examples

			Triangle begins as:
  0;
  1, 0;
  1, 2, 0;
  1, 1, 2, 0;
  1, 2, 1, 4, 0;
  1, 1, 3, 6, 2,  0;
  1, 2, 2, 3, 6,  4,  0;
  1, 1, 4, 5, 8,  6,  2,  0;
  1, 2, 3, 2, 1, 10,  6,  4, 0;
  1, 2, 4, 1, 7,  3, 12, 10, 6, 0;
		

Crossrefs

Cf. A001223 (2nd diagonal), A033955 (row sums), A102647 (row products excluding 0's), A031131 (3rd diagonal after first 3 terms).

Programs

  • Magma
    A173655:= func< n,k | NthPrime(n) mod NthPrime(k) >;
    [A173655(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 10 2024
    
  • Maple
    A173655 := proc(n,k) ithprime(n) mod ithprime(k) ;end proc:
    seq(seq(A173655(n,k),k=1..n),n=1..20) ; # R. J. Mathar, Nov 24 2010
  • Mathematica
    Flatten[Table[Mod[Prime[n], Prime[Range[n]]], {n, 15}]]
  • PARI
    forprime(p=2,40,forprime(q=2,p,print1(p%q", "))) \\ Charles R Greathouse IV, Dec 21 2011
    
  • SageMath
    def A173655(n,k): return nth_prime(n)%nth_prime(k)
    flatten([[A173655(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Apr 10 2024

A165659 Numerators of A007504 divided by A033955, starting from the second term of A033955.

Original entry on oeis.org

2, 5, 5, 17, 28, 41, 58, 77, 50, 129, 16, 197, 119, 281, 164, 127, 440, 501, 568, 71, 356, 791, 46, 321, 530, 1161, 1264, 457, 1480, 1593, 344, 1851, 284, 2127, 2276, 809, 2584, 2747, 1457, 441, 1633, 1149, 3638, 3831, 1007, 4227, 4438
Offset: 1

Views

Author

Creighton Dement, Sep 24 2009

Keywords

Comments

Conjecture: with the exception of the second term, 2 <= a(n)/A165660(n) < 3.

Crossrefs

Programs

  • PARI
    a1(n)=sum(i=1, n, prime(i));
    b1(n)=sum(i=1, n, prime(n+1)%prime(i));
    a(n)=if(n<0, 0, numerator(a1(n)/b1(n)));
    for(n=1, 50, print1(a(n) ", "))

Extensions

Typo in definition corrected by Creighton Dement, Oct 09 2009

A165660 Denominators of A007504 divided by A033955, starting from the second term of A033955.

Original entry on oeis.org

1, 3, 2, 8, 13, 18, 27, 29, 23, 56, 7, 74, 44, 98, 67, 49, 171, 200, 217, 28, 137, 309, 17, 116, 209, 448, 471, 174, 571, 629, 137, 739, 111, 793, 853, 318, 997, 1002, 560, 164, 610, 446, 1419, 1466, 385, 1615, 1573, 1633, 1707, 1825, 946, 662, 2221, 781, 1198
Offset: 1

Views

Author

Creighton Dement, Sep 24 2009

Keywords

Comments

Conjecture: with the exception of the second term, 2 <= A165659(n)/a(n) < 3.

Crossrefs

Programs

  • PARI
    a1(n)=sum(i=1, n, prime(i)); b1(n)=sum(i=1, n, prime(n+1)%prime(i)); a(n)=if(n<0, 0, denominator(a1(n)/b1(n))); for(n=1, 50, print1(a(n) ", "))

Extensions

Terms corrected by Creighton Dement, Oct 03 2009
Removed a conjecture - R. J. Mathar, Oct 09 2009
Typo in definition corrected by Creighton Dement, Oct 09 2009

A340541 Primes p such that the product of (p mod q) for primes q < p is a multiple of the sum of (p mod q) for primes q < p.

Original entry on oeis.org

3, 11, 17, 31, 59, 67, 73, 101, 103, 173, 179, 193, 199, 211, 223, 349, 401, 463, 491, 499, 557, 563, 569, 571, 577, 587, 607, 613, 619, 631, 673, 709, 751, 757, 769, 797, 809, 857, 859, 877, 911, 919, 929, 967, 1009, 1033, 1039, 1049, 1151, 1153, 1193, 1201, 1237, 1249, 1259, 1289, 1297, 1303
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 11 2021

Keywords

Comments

Primes prime(n) such that A102647(n) is divisible by A033955(n).

Examples

			a(3) = 17 is a term since (17 mod q) for primes q=2,3,5,7,11,13 are 1,2,2,3,6,4, and 1*2*2*3*6*4 = 288 is divisible by 1+2+2+3+6+4 = 18.
		

Crossrefs

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..1000)]:
    filter:= proc(n) local L,k;
      L:= [seq(P[n] mod P[k],k=1..n-1)];
      convert(L,`*`) mod convert(L,`+`) = 0
    end proc:
    S:=select(filter, [$2..1000]):
    map(t -> P[t], S);
  • PARI
    isok(p) = {if (isprime(p) && (p>2), my(s=0, t=1); forprime(q=2, p-1, my(x= p%q); s += x; t *= x;); !(t % s););} \\ Michel Marcus, Jan 11 2021

A383752 Product of nonzero remainders n mod p, over all primes p < n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 6, 8, 3, 8, 10, 36, 24, 8, 30, 288, 420, 1920, 2268, 640, 270, 2880, 9240, 13824, 7560, 19200, 17820, 120960, 64064, 362880, 5054400, 1881600, 475200, 165888, 464100, 6386688, 4082400, 1228800, 2120580, 34836480, 23474880, 217728000
Offset: 1

Views

Author

DarĂ­o Clavijo, May 28 2025

Keywords

Crossrefs

Programs

  • Mathematica
    A383752[n_] := Times @@ DeleteCases[Mod[n, Prime[Range[PrimePi[n - 2]]]], 0];
    Array[A383752, 50] (* Paolo Xausa, Jun 05 2025 *)
  • PARI
    a(n) = vecprod(select(x->(x!=0), apply(lift, apply(x->Mod(n, x), primes([2,n-1]))))); \\ Michel Marcus, May 28 2025
  • Python
    from sympy import primerange
    def a(n):
        s = 1
        for p in primerange(0, n):
            if p > (n >> 1): s *= (n-p)
            elif (x:= n % p) > 0: s*= x
        return s
    print([a(n) for n in range(1,41)])
    

Formula

a(p) = A102647(p) if p prime.
Showing 1-8 of 8 results.