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

A271565 Number of 8's found in the first differences of a reduced residue system modulo a primorial p#.

Original entry on oeis.org

0, 0, 0, 2, 28, 394, 6812, 128810, 2918020, 83120450, 2524575200, 91589444450, 3682730287600, 155231331960250, 7156139793803000, 372520258834974250, 21613446896458917500, 1296556574981939521250, 85520460088068245240000, 5980843188551617897761250, 430093937447553491544932500
Offset: 1

Views

Author

Logan W. Wilbur, Apr 10 2016

Keywords

Comments

Technically, the formula is undefined modulo 2# or 3#, but I have listed their values as "0", since there are no 8's in the first differences of their reduced residue systems. For our purposes, by "8's", we mean n such that n,n+8 are relatively prime to the primorial modulus, while n+1,n+2,n+3,n+4,n+5,n+6,n+7 all share a factor (or factors) with p#.

Examples

			Modulo 5# (=30), there are (5-2)-2*(5-3)+(5-4)=0 occurrences where n, n+8 are relatively prime but n+1, n+2, n+3, n+4, n+5, n+6, n+7 share a factor with 30.
Modulo 7# (=210), there are (7-2)(5-2)-2*(7-3)(5-3)+(7-4)(5-4)=15-16+3=2 such occurrences; i.e when n=89,113 (mod210).
		

Crossrefs

Programs

  • Mathematica
    Table[Product[Prime@ k - 2, {k, 3, n}] - 2 Product[Prime@ k - 3, {k, 3, n}] + Product[Prime@ k - 4, {k, 3, n}], {n, 21}] (* Michael De Vlieger, Apr 11 2016 *)
  • PARI
    a(n) = prod(k=3, n, prime(k)-2) - 2*prod(k=3, n, prime(k)-3) + prod(k=3, n, prime(k)-4); \\ Michel Marcus, Apr 11 2016

Formula

a(n) = product(p-2) - 2*product(p-3) + product(p-4), where p runs through the primes > 3 and <= prime(n).

Extensions

More terms from Michel Marcus, Apr 11 2016

A285298 Number of 10's found in the first differences of a reduced residue system modulo a primorial p#.

Original entry on oeis.org

0, 0, 0, 2, 30, 438, 7734, 148530, 3401790, 97648950, 2985436650, 108861586050, 4396116829650, 186022750845750, 8604610718954250, 449203003036037250, 26126835342151293750, 1570919774837171508750, 103827535054074567986250, 7274630596396103444253750
Offset: 1

Views

Author

Andrew Fuchs, Apr 16 2017

Keywords

Comments

Technically, the formula is undefined modulo 2# or 3#, but I have listed their values as "0", since there are no 10's in the first differences of their reduced residue systems. For our purposes, by "10's", we mean n such that n,n+10 are relatively prime to the primorial modulus, while n+1,n+2,n+3,n+4,n+5,n+6,n+7,n+8,n+9 all share a factor (or factors) with p#.

Crossrefs

Programs

  • Mathematica
    Table[4*Product[-2 + Prime[z], {z, 4, i}] -
       6*Product[-3 + Prime[z], {z, 4, i}] +
       2*Product[-4 + Prime[z], {z, 4, i}], {i, 20}]

Formula

a(n) = 4*product(p-2) - 6*product(p-3) + 2*product(p-4), where p runs through the primes > 5 and <= prime(n).
Showing 1-2 of 2 results.