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 61-70 of 106 results. Next

A331118 Irregular triangle read by rows where row n lists primitive first differences in the reduced residue system of A002110(n).

Original entry on oeis.org

2, 2, 4, 2, 4, 6, 2, 4, 6, 8, 10, 2, 4, 6, 8, 10, 12, 14, 2, 4, 6, 8, 10, 12, 14, 16, 18, 22, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 34, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36
Offset: 1

Views

Author

Michael De Vlieger, Jan 10 2020

Keywords

Comments

Let primorial P(n) = A002110(n) and let r < P(n) be a number such that gcd(r, P(n)) = 1. Thus r is a residue in the reduced residue system (RRS) of P(n), and the number of r pertaining to P(n) is given by phi(P(n)) = A005867(n). We take the union of the first differences of the r in the RRS of P(n) to arrive at row n of this sequence.
Let L be the run length of numbers m in the cototient of a number k and let the first differences D in the RRS of k. The cototient includes any m such that at least 1 prime p | m also divides k, in other words, any m such that gcd(m, k) > 1. We note L = D - 1.
Row n of this sequence is the union of first differences of row n of A286941.
Let D be a primitive first difference as defined above. D is necessarily even since P(n) (for n > 0) is even and all r are odd.
Length of row n = A329815(n).

Examples

			Triangle begins:
n    Row
1    2;
2    2, 4;
3    2, 4, 6;
4    2, 4, 6, 8, 10;
5    2, 4, 6, 8, 10, 12, 14;
6    2, 4, 6, 8, 10, 12, 14, 16, 18,     22;
7    2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26;
8    2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,     34;
...
(Triangle is organized so that the D appear in columns.)
Row 1 = {2} because P(1) = 2 is prime and has only 2 itself in the cototient.
Row 2 = {2, 4} since the numbers {1, 5} are coprime to P(2) = 6, and their difference is 4.
Row 3 contains {2, 4, 6} since we encounter the run lengths 6 between 1 and 7, 4 between 7 and 11, and 2 between 11 and 13. The run lengths are repeated but no new lengths appear for P(3) = 30.
		

Crossrefs

Programs

  • Mathematica
    Table[Block[{r = 1, s = {}}, Do[If[GCD[i, P] == 1, If[FreeQ[s, #], AppendTo[s, #]] &[i - r]; r = i], {i, 3, P/If[P > 6, 2, 1/2], 2}]; Union@ s], {P, FoldList[Times, Prime@ Range@ 8]}] // Flatten

Formula

A048670(n) = largest term in row n.
A329815(n) = length of row n.

A336015 Irregular triangle where row n lists primes q below the n-th primorial such that the multiplicative order of q mod the n-th primorial is 2. I.e., such primes q having the least k such that q^k (mod primorial(n)) == 1 is 2.

Original entry on oeis.org

5, 11, 19, 29, 29, 41, 71, 139, 181, 419, 461, 659, 769, 881, 1231, 1429, 2309, 1429, 2729, 4159, 5279, 5851, 8009, 8581, 10009, 12011, 12739, 13441, 13859, 14741, 15289, 17291, 20021, 23869, 24179, 30029, 1429, 23869, 77351, 95369, 102101, 116689, 120121, 188189
Offset: 2

Views

Author

Keywords

Examples

			Table begins:
5;
11, 19, 29;
29, 41, 71, 139, 181;
419, 461, 659, 769, 881, 1231, 1429, 2309;
...
For row 2 we look for primes q such that q^2 == 1 (mod primorial(2)) == 1 (mod 6) where q is coprime to 6. It turns out the only prime with this property is 5 as 5^2 == 1 (mod 6). - _David A. Corneth_, Aug 15 2020
		

Crossrefs

Programs

  • Mathematica
    Table[Function[P, Select[Prime@ Range[n, PrimePi[P - 1]], MultiplicativeOrder[#, P] == 2 &]][Product[Prime@ i, {i, n}]], {n, 8}] // Flatten
  • PARI
    row(n) = my(pp = vecprod(primes(n)), res=List()); forstep(i=pp/prime(n)+1, pp-1, 2, if(gcd(i,pp) == 1 && znorder(Mod(i,pp)) == 2 && isprime(i), listput(res,i))); res \\ David A. Corneth, Jul 08 2020

Extensions

New name from David A. Corneth, Aug 15 2020

A342996 The number of partitions of the n-th primorial.

Original entry on oeis.org

1, 2, 11, 5604, 9275102575355, 21565010821742923705373368869534441911701199887419
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
    a:= n-> combinat[numbpart](b(n)):
    seq(a(n), n=0..5);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, b[n - 1]*Prime[n]];
    a[n_] := PartitionsP[b[n]];
    Table[a[n], {n, 0, 5}] (* Jean-François Alcover, Jul 07 2021, from Maple *)
  • PARI
    a(n) = numbpart(prod(k=1, n, prime(k))); \\ Michel Marcus, Jul 07 2021
  • Python
    from sympy import primorial
    from sympy.functions import partition
    def A342996(n): return partition(primorial(n)) if n > 0 else 1 # Chai Wah Wu, Apr 03 2021
    

Formula

a(n) = A000041(A002110(n)).

A343147 The number of partitions of the n-th primorial into distinct parts.

Original entry on oeis.org

1, 1, 4, 296, 884987529, 41144767887910339859917073881177514
Offset: 0

Views

Author

Alois P. Heinz, Apr 06 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
    g:= proc(n) option remember; `if`(n=0, 1, add(g(n-j)*add(
         `if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    a:= n-> g(b(n)):
    seq(a(n), n=0..5);
  • Mathematica
    $RecursionLimit = 2^13;
    b[n_] := b[n] = If[n == 0, 1, b[n - 1]*Prime[n]];
    g[n_] := g[n] = If[n == 0, 1, Sum[g[n - j]*Sum[
         If[OddQ[d], d, 0], {d, Divisors[j]}], {j, 1, n}]/n];
    a[n_] := g[b[n]];
    Table[a[n], {n, 0, 5}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)

Formula

a(n) = A000009(A002110(n)).

A359262 a(n) is the largest number m such that prime(n)^m is in A359260.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 3, 1, 1, 5, 3, 1, 3, 1, 1, 1, 5, 3, 1, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 5, 3, 3, 1, 1, 1, 5, 1, 3, 1, 3, 9, 3, 1, 3, 1, 1, 5, 1, 1, 1, 1, 5, 3, 1, 3, 1, 3, 1, 3, 1, 5, 3, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 1, 3, 1, 9, 1, 3, 3, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Dec 23 2022

Keywords

Comments

a(n) is the largest number m such that the arithmetic mean of {1, p, p^2, ..., p^k} is an integer for all k in 1..m.
Apparently, all the terms are of the form prime(k)-2 (A040976). Conjecture: The asymptotic density of the occurrences of prime(k)-2 is (1/s(k-1)-1/s(k)), where s(k) = A005867(k) = phi(prime(k)#), and prime(k)# is the k-th primorial number (A002110).
The sums of the first 10^k terms, for k = 1, 2, ..., are 15, 221, 2291, 23287, 233641, 2337007, 23379901, 233814475, 2338211029, 23382168187, ... . If the mentioned above conjecture is correct, then the asymptotic mean of this sequence is Sum_{k>=1} (prime(k)-2)*(1/s(k-1)-1/s(k)) = 2.33821872365981424748... .
Apparently, the indices of records after n = 1 occur at A000720(A073917(n)) (verified for the first 12 terms of A073917) with record values a(A000720(A073917(n))) = prime(n+1) - 2 (verified for the first 150 terms of A073917).

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], k = 1, r = s = 1}, While[Divisible[s, k], k++; r *= p; s += r]; k - 2]; Array[a, 100]
  • PARI
    a(n) = {my(p = prime(n), k = 1, r = s = 1); while(!(s%k), k++; r *= p; s += r); k - 2; }

Formula

a(n) >= 1 for n >= 2.
a(n) >= 3 iff prime(n) == 1 (mod 6) (prime(n) is in A002476).
Conjectures:
a(n) >= 5 iff prime(n) == 1 (mod 30) (prime(n) is in A132230).
a(n) >= 9 iff prime(n) == 1 (mod 210) (prime(n) is in A073102).
a(n) >= prime(k) - 2 iff prime(n) == 1 (mod A002110(k-1)).

A051853 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 leftmost a varying fastest.

Original entry on oeis.org

1, 1, 5, 1, 11, 7, 17, 13, 23, 19, 29, 1, 71, 127, 197, 43, 113, 169, 29, 121, 191, 37, 107, 163, 23, 79, 149, 31, 101, 157, 17, 73, 143, 199, 59, 151, 11, 67, 137, 193, 53, 109, 179, 61, 131, 187, 47, 103, 173, 19, 89, 181, 41, 97, 167, 13, 83, 139, 209, 1, 1541
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,11,7,17,13,23,19,29; 1,71,127,197,43,113,169,29,121,191,37,107,163,23,79,149,31,101,157,17,73,143,199,59,151,11,67,137,193,53,109,179,61,131,187,47,103,173,19,89,181,41,97,167,13,83,139,209;
		

Crossrefs

Cf. A051854.

Programs

  • Maple
    with(numtheory); incr_plist_from_left := proc(aa) local i,n,a; a := aa; n := nops(a); for i from 1 to n 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_left_n_times := proc(aa,n) local a,i; a := aa; for i from 1 to n do a := incr_plist_from_left(a); od; RETURN(a); end; form_modlist := proc(a) local b,i; b := []; for i from 1 to nops(a) do b := [op(b),ithprime(i)]; od; RETURN(b); end;
    prim_chrem_left := proc(n) local r,m; r := incr_plist_from_left_n_times([],n); m := form_modlist(r); RETURN(chrem(r,m)); end;
  • Mathematica
    row[n_] := Module[{i}, pp = Prime[Range[n]]; iter = Sequence @@ Table[{i[k], 1, pp[[k]] - 1}, {k, n, 1, -1}]; 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_left(n) (see Maple code)

A057857 Number of residue classes modulo n-th primorial number which contain a prime.

Original entry on oeis.org

1, 2, 4, 11, 52, 485, 5766, 92167, 1658888, 36495369, 1021870090, 30656102411, 1103619686412, 44144787456013, 1854081073152014, 85287729364992015, 4434961926979584016, 257227791764815872017, 15433667505888952320018
Offset: 0

Views

Author

Henry Bottomley, Sep 08 2000

Keywords

Examples

			a(3) = 11 since 30 is the 3rd primorial number and 30k+m can be prime if m = 2, 3 or 5 (once each with k = 0) or m = 1, 7, 11, 13, 17, 19, 23 or 29 (each for an infinite number of values of k).
		

Crossrefs

Formula

a(n) = A005867(n)+n = A002110(n) - A057858(n).

A058262 a(n) is the quotient obtained when the totient of primorial (that is, the product of p-1 values) is divided by the LCM of the same p-1 values.

Original entry on oeis.org

1, 1, 2, 4, 8, 96, 384, 2304, 4608, 18432, 552960, 19906560, 796262400, 33443020800, 66886041600, 267544166400, 535088332800, 32105299968000, 2118949797888000, 148326485852160000, 10679506981355520000
Offset: 0

Views

Author

Labos Elemer, Dec 06 2000

Keywords

Examples

			n=7: lcm(2-1, 3-1, 5-1, 7-1, 11-1, 13-1, 17-1) = lcm(1,2,4,6,10,12,16) = 240; phi(2*3*5*7*11*13*17) = phi(510510) = 92160 = A005867(8); a(7) = 92160/240 = 384.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    nmax:=22: p:=seq([seq(ithprime(k)-1,k = 1 .. n)],n=1..nmax):
    a:seq(phi(mul(ithprime(i),i=1..n))/lcm(seq(p[n][i],i=1..nops(p[n]))),n=1..nmax); # Muniru A Asiru, Jul 08 2018
  • PARI
    a(n) = my(v=vector(n+1, k, prime(k)-1)); prod(k=1, #v, v[k])/lcm(v); \\ Michel Marcus, Jul 08 2018

Extensions

Definition revised by Editors, Jul 15 2018

A078559 Numerator of Product_{i=1..n} (p_i + 1)/(p_i - 1) where p_i is the i-th prime.

Original entry on oeis.org

3, 6, 9, 12, 72, 84, 189, 21, 252, 270, 288, 304, 1596, 152, 3648, 49248, 295488, 1526688, 17302464, 622888704, 640191168, 1707176448, 10243058688, 23046882048, 23527025424, 599939148312, 47054050848, 2540918745792
Offset: 1

Views

Author

Labos Elemer, Dec 06 2002

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, B48.

Crossrefs

Programs

  • Maple
    Q:= 1: p:= 1:
    for n from 1 to 100 do
      p:= nextprime(p);
      Q:= Q * (p+1)/(p-1);
      A[n]:= numer(Q);
    od:
    seq(A[i],i=1..100); # Robert Israel, May 11 2018
  • Mathematica
    Numerator[Table[Product[(Prime[i] + 1)/(Prime[i] - 1), {i, n}], {n, 30}]] (* Alonso del Arte, Aug 23 2011 *)
  • PARI
    a(n) = numerator(prod(i=1, n, (prime(i)+1)/(prime(i)-1))); \\ Michel Marcus, May 11 2018

Formula

a(n) = A054640(n)/A078558(n).
a(n)/A078560(n) ~ C*log^2(prime(n)), where C = exp(2*gamma)/zeta(2) = 6(e^gamma/pi)^2 = A091724 / A013661. Physics note: (a(n)/A078560(n) - 1)/(a(n)/A078560(n) + 1) = tanh(Sum_{k=1..n} arctanh(1/prime(k))) is the relativistic sum of n velocities c/2, c/3, ..., c/prime(n), in units where the speed of light c = 1. - Thomas Ordowski, Nov 06 2024

Extensions

Improved definition from Franklin T. Adams-Watters, Dec 02 2005

A078560 Denominator of Product_{i=1..n} (p_i+1)/(p_i-1). Numerators are in A078559.

Original entry on oeis.org

1, 1, 1, 1, 5, 5, 10, 1, 11, 11, 11, 11, 55, 5, 115, 1495, 8671, 43355, 476905, 16691675, 16691675, 43398355, 254190365, 559218803, 559218803, 13980470075, 1075420775, 56997301075, 1036314565, 1036314565, 1036314565, 6123676975
Offset: 1

Views

Author

Labos Elemer, Dec 06 2002

Keywords

Comments

According to Koninck (2009), a(8) is the largest value of this sequence known to be 1 (meaning that the product is an integer). [Alonso del Arte, Aug 23 2011]

References

  • R. K. Guy, Unsolved Problems in Number Theory, B48.
  • J.-M. De Koninck, Those Fascinating Numbers, Amer. Math. Soc., 2009, p. 6.

Crossrefs

Programs

  • Maple
    Q:= 1: p:= 1:
    for n from 1 to 100 do
      p:= nextprime(p);
      Q:= Q * (p+1)/(p-1);
      A[n]:= denom(Q);
    od: seq(A[i], i=1..100); #
  • Mathematica
    Denominator[Table[Product[(Prime[i] + 1)/(Prime[i] - 1), {i, n}], {n, 30}]] (* Alonso del Arte, Aug 23 2011 *)
  • PARI
    a(n) = denominator(prod(i=1, n, (prime(i)+1)/(prime(i)-1))); \\ Michel Marcus, May 11 2018

Formula

a(n) = A005867(n)/A078558(n).

Extensions

Improved definition from Franklin T. Adams-Watters, Dec 02 2005
Previous Showing 61-70 of 106 results. Next