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 81-90 of 106 results. Next

A051854 Table of solutions to all possible Chinese Remainder Equations x = a1 mod p1, x = a2 mod p2, ..., x = an mod pn, where p1 - pn are the first n primes and each a1 - an varies between 1 and (its respective) p-1, with the rightmost a (an) varying fastest.

Original entry on oeis.org

1, 1, 5, 1, 7, 13, 19, 11, 17, 23, 29, 1, 121, 31, 151, 61, 181, 127, 37, 157, 67, 187, 97, 43, 163, 73, 193, 103, 13, 169, 79, 199, 109, 19, 139, 71, 191, 101, 11, 131, 41, 197, 107, 17, 137, 47, 167, 113, 23, 143, 53, 173, 83, 29, 149, 59, 179, 89, 209, 1, 211, 421
Offset: 1

Views

Author

Antti Karttunen, Dec 13 1999

Keywords

Examples

			Rows have lengths 1,2,8,48,480,5760,92160,... (A005867(n)) and terms 1; 1,5; 1,7,13,19,11,17,23,29;
		

Crossrefs

Cf. A051853.

Programs

  • Maple
    with(numtheory); incr_plist_from_right := proc(aa) local i,n,a; a := aa; n := nops(a); for i from n by -1 to 1 do if(a[i] < (ithprime(i)-1)) then a[i] := a[i]+1; RETURN(a); else a[i] := 1; fi; od; RETURN([op(a),1]); end;
    incr_plist_from_right_n_times := proc(aa,n) local a,i; a := aa; for i from 1 to n do a := incr_plist_from_right(a); od; RETURN(a); end; prim_chrem_right := proc(n) local r,m; r := incr_plist_from_right_n_times([],n); m := form_modlist(r); RETURN(chrem(r,m)); end; # For form_modlist see A051853.
  • Mathematica
    row[n_] := Module[{i}, pp = Prime[Range[n]]; iter = Sequence @@ Table[{ i[k], 1, pp[[k]] - 1}, {k, 1, n}]; Table[ChineseRemainder[Array[i, n], pp], iter // Evaluate] // Flatten]; Table[row[n], {n, 1, 5}] // Flatten (* Jean-François Alcover, Mar 06 2016 *)

Formula

a(n) = prim_chrem_right(n) (see Maple code)

A058251 LCM of n-th primorial number and its Euler totient.

Original entry on oeis.org

1, 2, 6, 120, 1680, 36960, 5765760, 1568286720, 536354058240, 24672286679040, 2861985254768640, 2661646286934835200, 3545312854197200486400, 5814313080883408797696000, 10500649424075436288638976000
Offset: 0

Views

Author

Labos Elemer, Dec 05 2000

Keywords

Examples

			a(6) = LCM(30030,5760) = 5765760.
		

Crossrefs

Programs

  • Maple
    [seq(ilcm(product(ithprime(k), k=1..m), product(ithprime(k)-1, k=1..m)), m=1..20)];
  • Mathematica
    LCM[#,EulerPhi[#]]&/@Rest[FoldList[Times,1,Prime[Range[15]]]] (* Harvey P. Dale, Nov 29 2011 *)
  • PARI
    P(n) = prod(k=1, n, prime(k)); \\ A002110
    a(n) = my(p= P(n)); lcm(p, eulerphi(p)); \\ Michel Marcus, Apr 27 2022

Formula

a(n) = LCM(A002110(n), A000010(A002110(n))) = LCM(A002110(n), A005867(n)).
a(n) = A009262(A002110(n)). - Michel Marcus, Apr 27 2022

Extensions

a(0)=1 inserted by Jamie Morken, Apr 27 2022

A058256 a(n) = A058254(n+1)/A058254(n).

Original entry on oeis.org

2, 2, 3, 5, 1, 4, 3, 11, 7, 1, 1, 1, 1, 23, 13, 29, 1, 1, 1, 1, 1, 41, 1, 2, 5, 17, 53, 3, 1, 1, 1, 1, 1, 37, 1, 1, 3, 83, 43, 89, 1, 19, 2, 7, 1, 1, 1, 113, 1, 1, 1, 1, 5, 4, 131, 67, 1, 1, 1, 47, 73, 1, 31, 1, 79, 1, 1, 173, 1, 1, 179, 61, 1, 1, 191, 97, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Labos Elemer, Dec 06 2000

Keywords

Comments

a(n) = 1 if in prime(n+1)-1 no new prime divisor or new power of a prime appear, like LCM[{1, 2, 4, 6, 10, 12, 16, 22}]= LCM[{1, 2, 4, 6, 10, 12, 16, 22, 28}].
a(n) > 1 if in prime(n+1)-1 new prime divisor(s) or new power(s) of a prime arise, like in A058254(15) compared with A058254(14), where the new prime divisor is 23 only, so a(14)=23. Such sites of increase do not correspond to the natural order of primes and prime-powers like in A054451.

Crossrefs

Programs

  • PARI
    f(n) = lcm(apply(p->p-1, primes(n))); \\ A058254
    a(n) = f(n+1)/f(n); \\ Michel Marcus, Mar 22 2020

Formula

a(n) = lcm{i=1..n+1} (prime(i)-1) / lcm{i=1..n} (prime(i)-1).

Extensions

Offset corrected by Amiram Eldar, Sep 24 2019

A059863 a(n) = Product_{i=3..n} (prime(i)-4).

Original entry on oeis.org

1, 1, 1, 3, 21, 189, 2457, 36855, 700245, 17506125, 472665375, 15597957375, 577124422875, 22507852492125, 967837657161375, 47424045200907375, 2608322486049905625, 148674381704844620625, 9366486047405211099375, 627554565176149143658125, 43301264997154290912410625
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

References

  • See A059862 for references.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.

Crossrefs

Programs

  • PARI
    a(n) = prod(i=3, n, prime(i)-4); \\ Michel Marcus, Aug 25 2019

Extensions

More terms from Michel Marcus, Aug 25 2019

A059864 a(n) = Product_{i=4..n} (prime(i)-5), where prime(i) is i-th prime.

Original entry on oeis.org

1, 1, 1, 2, 12, 96, 1152, 16128, 290304, 6967296, 181149696, 5796790272, 208684449792, 7930009092096, 333060381868032, 15986898329665536, 863292509801938944, 48344380548908580864, 2997351594032332013568
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Comments

Such products arise in Hardy-Littlewood prime k-tuplet conjectural formulas.

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.
  • R. K. Guy, Unsolved Problems in Number Theory, A8, A1
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979.
  • G. Polya, Mathematics and Plausible Reasoning, Vol. II, Appendix Princeton UP, 1954

Crossrefs

Programs

  • Magma
    [n le 3 select 1 else (&*[NthPrime(j) -5: j in [4..n]]): n in [1..30]]; // G. C. Greubel, Feb 02 2023
    
  • Mathematica
    Join[{1,1,1},FoldList[Times,Prime[Range[4,20]]-5]] (* Harvey P. Dale, Dec 29 2018 *)
  • PARI
    a(n) = prod(k=4, n, prime(k)-5); \\ Michel Marcus, Dec 12 2017
    
  • SageMath
    def A059864(n): return product(nth_prime(j) -5 for j in range(4,n+1))
    [A059864(n) for n in range(1,31)] # G. C. Greubel, Feb 02 2023

A112228 Product of the first n (semiprimes - 1).

Original entry on oeis.org

3, 15, 120, 1080, 14040, 196560, 3931200, 82555200, 1981324800, 49533120000, 1585059840000, 52306974720000, 1778437140480000, 65802174197760000, 2500482619514880000, 112521717878169600000, 5401042458152140800000
Offset: 1

Views

Author

Jonathan Vos Post, Nov 28 2005

Keywords

Comments

Semiprime analog of A005867.

Examples

			a(10) = 3*5*8*9*13*14*20*21*24*25 =
(4-1)*(6-1)*(9-1)*(10-1)*(14-1)*(15-1)*(21-1)*(22-1)*(25-1)*(26-1) = 49533120000, the product of the first 10 (semiprimes minus one).
		

Crossrefs

Programs

  • Mathematica
    FoldList[Times,Select[Range[50],PrimeOmega[#]==2&]-1] (* Harvey P. Dale, Jan 21 2023 *)
  • PARI
    A001358(n)={
        if(n==1,
            return(4),
            for(a=A001358(n-1)+1,100000000000000000,
                if (bigomega(a)==2,
                    return(a)
                ) ;
            ) ;
        ) ;
    }
    A112228(n)={
        prod(i=1,n,A001358(i)-1)
    } /* R. J. Mathar, Mar 09 2012 */

Formula

a(n) = Prod[from i = 1 to n] (A001358(i)-1).

A280050 a(n) = Sum_{k=2..n} k/lpf(k), where lpf(k) is the least prime dividing k (A020639).

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 13, 16, 21, 22, 28, 29, 36, 41, 49, 50, 59, 60, 70, 77, 88, 89, 101, 106, 119, 128, 142, 143, 158, 159, 175, 186, 203, 210, 228, 229, 248, 261, 281, 282, 303, 304, 326, 341, 364, 365, 389, 396, 421, 438, 464, 465, 492, 503, 531, 550, 579, 580, 610, 611, 642, 663, 695, 708, 741, 742, 776, 799, 834, 835
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 02 2017

Keywords

Comments

Sum of the largest proper divisors of all positive integers <= n.

Examples

			For n = 8 the divisors of the first eight positive integers are {1}, {1, 2}, {1, 3}, {1, 2, 4}, {1, 5}, {1, 2, 3, 6}, {1, 7}, {1, 2, 4, 8}, so a(8) = 1 + 1 + 2 + 1 + 3 + 1 + 4 = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[k/FactorInteger[k][[1, 1]], {k, 2, n}], {n, 71}]
    Join[{0}, Accumulate[Table[k/FactorInteger[k][[1, 1]], {k, 2, 71}]]] (* Amiram Eldar, Jul 03 2025 *)
  • PARI
    list(kmax) = {my(s = 0); print1(s, ", "); for(k = 2, kmax, s += k/factor(k)[1,1]; print1(s, ", "));} \\ Amiram Eldar, Jul 03 2025

Formula

a(n) = Sum_{k=2..n} k/A020639(k).
a(n) + 1 = Sum_{k=1..n} A032742(k).
a(p^k) = a(p^k-1) + p^(k-1), when p is prime.
a(n) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - Amiram Eldar, Jul 03 2025

A307826 The number of integers r such that all primes above a certain value have the form primorial(n)*q +- r.

Original entry on oeis.org

1, 1, 4, 24, 240, 2880, 46080, 829440, 18247680, 510935040, 15328051200, 551809843200, 22072393728000, 927040536576000, 42643864682496000, 2217480963489792000, 128613895882407936000, 7716833752944476160000, 509311027694335426560000
Offset: 1

Views

Author

William Boyles, Apr 30 2019

Keywords

Examples

			For n=3, the third primorial is 2*3*5=30, and all primes at least 17 have the form 30n +- (1,7,11,13). So, a(3) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_] := EulerPhi[Product[Prime[i], {i, 1, n}]]/2; Array[a, 20] (* Amiram Eldar, Jul 08 2019 *)
  • Python
    import sympy
    def A307826(n):
        sympy.sieve.extend_to_no(n)
        s = list(sympy.sieve._list)
        prod = s[0]
        print("1")
        for i in range(1,n):
            prod*=s[i]
            print(sympy.ntheory.factor_.totient(prod)//2)

Formula

a(n) = Product_{k=1..n} A156037(k).
a(n) = A000010(A002110(n))/2 for n > 1.
a(n) = A005867(n)/2 for n > 1. - Alexandre Herrera, Apr 16 2023

A308665 Cardinality of the shortcut set of the multiplicative group of integers modulo the n-th primorial.

Original entry on oeis.org

1, 2, 4, 48, 384, 2304, 4608, 18432, 552960, 19906560, 796262400, 33443020800, 66886041600, 267544166400, 535088332800, 32105299968000, 2118949797888000, 148326485852160000, 10679506981355520000, 833001544545730560000, 1666003089091461120000, 146608271840048578560000
Offset: 3

Views

Author

Alexey V. Bazhin, Jun 15 2019

Keywords

Comments

{R(1),...,R(phi(prime(n)#))} = {(prime(n)#/2 +- {R(1),...,R(k)}*2^{1,2,...,z}) mod prime(n)#}.
The formula is used for the compressed representation of the set of the multiplicative group of integers modulo prime(n)#. This is a new formula in number theory. {R(1),...,R(k)} is the shortcut set of the multiplicative group of integers modulo prime(n)# (or compressed representation of the set of the multiplicative group of integers modulo prime(n)#).

Examples

			First example:
Let R = {1, 7, 11, 13, 17, 19, 23, 29} be the set of the multiplicative group of integers modulo 30 (or it is the set of positive integers less than 2*3*5 and prime to 2*3*5, or it is the reduced residue system for the 3rd primorial number 30 = A002110(3)).
The cardinality of |R| is equal to 8 elements, 8 = A005867(3).
The set {1} is the shortcut set of the multiplicative group of integers modulo 30.
The cardinality of |{1}| = 1, i.e., a(1) = 1.
R = { (30/2 +- {1}*2^{1, ..., 4}) mod 30 } = {(30/2 +- {1}*2^{1,2,3,4}) mod 30}={(15+2^1) mod 30, (15-2^1) mod 30,(15+2^2) mod 30, (15-2^2) mod 30, (15+2^3) mod 30, (15-2^3) mod 30, (15+2^4) mod 30, (15-2^4) mod 30} = {1,7,11,13,17,19,23,29},
where 30 = A002110(3), 4 = A155747(2), |R| = A005867(3).
4 is the smallest number m with the property that 2^m-1 is divisible by the first n odd primes.
Second example:
Let R = {1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209} be the set of the multiplicative group of integers modulo 210 (or it is the set of positive integers less than 2*3*5*7 and prime to 2*3*5*7, or it is the reduced residue system for the 4th primorial number 210 = A002110(4)).
The cardinality of |R| is equal to 48 elements, 48 = A005867(5).
The set {1, 11} is the shortcut set of the multiplicative group of integers modulo 210.
The cardinality of |{1, 11}| = 2, i.e., a(2) = 2.
R = { ( 210/2 +- {1, 11}*2 ^{1..12}) mod 210 }, where 210 = A002110(4), 12 = A155747(3), |R| = A005867(4).
12 is the smallest number m with the property that 2^m-1 is divisible by the first n odd primes.
General case:
R = {R(1), ..., R(phi(prime(n)#))},
R = {(prime(n)#/2 +- {R(1),R(2),...,R(k)}*2^{1,2,...,z}) mod prime(n)#}, where prime(n)# is the product of the first n primes, i.e., it is A002110(n); phi is Euler's totient function, which counts the positive integers up to a given argument that are relatively prime to the argument, in our case phi(prime(n)#) is A005867;
R is the set of the multiplicative group of integers modulo prime(n)#;
z is a term of A155747.
k is a term of a(n).
R(1) <= R(k) < R(phi(prime(n)#)).
Table:
+-----+-----------+----------------+---------+------+
|  n  | A002110   | A005867        | A155747 | a(n) |
|     | prime(n)# | phi(prime(n)#) | z       | k    |
+-----+-----------+----------------+---------+------+
|  0  |        1  |          1     |   -     |    - |
|  1  |        2  |          1     |   -     |    - |
|  2  |        6  |          2     |   2     |    - |
|  3  |       30  |          8     |   4     |    1 |
|  4  |      210  |         48     |  12     |    2 |
|  5  |     2310  |        480     |  60     |    4 |
|  6  |    30030  |       5760     |  60     |   48 |
|  7  |   510510  |      92160     | 120     |  384 |
|  8  |  9699690  |    1658880     | 360     | 2304 |
| ..  |      ...  |        ...     | ...     |  ... |
		

Crossrefs

Programs

  • PARI
    f(n) = prod(k=1, n, prime(k)-1); \\ A005867
    g(n) = lcm(vector(n, k, znorder(Mod(2, prime(k+1))))); \\ A155747
    a(n) = f(n+2)/(g(n+1)*2); \\ Michel Marcus, Jun 25 2019

Formula

a(n) = A005867(n+2)/(2*A155747(n+1)).
If {R(1),...,R(phi(prime(n)#))} = {(prime(n)#/2 +- {R(1),...,R(k)}*2^{1,2,...,z}) mod prime(n)#} then a(n) = k.

A318766 a(0) = 1; for n > 0, a(n) = (prime(n)^2 - 1) * a(n-1).

Original entry on oeis.org

1, 3, 24, 576, 27648, 3317760, 557383680, 160526499840, 57789539942400, 30512877089587200, 25630816755253248000, 24605584085043118080000, 33660439028338985533440000, 56549537567609495696179200000, 104503545424942348046539161600000
Offset: 0

Views

Author

Seiichi Manyama, Sep 03 2018

Keywords

Comments

The limit of A061742(n)/a(n) is zeta(2) (cf. A013661).

Crossrefs

Product_{k=1..n} (prime(k)^m - 1): A005867 (m=1), this sequence (m=2).

Programs

  • Mathematica
    a[n_]:=Product[Prime[k]^2-1, {k, 1, n}]; Join[{1},Array[a, nmax]] (* Stefano Spezia, Sep 03 2018 *)
  • PARI
    {a(n) = prod(k=1, n, prime(k)^2-1)}

Formula

a(n) = A084920(n) * a(n-1) for n > 0.
a(n) = Product_{k=1..n} (prime(k)^2 - 1).
Previous Showing 81-90 of 106 results. Next