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

A309497 Irregular triangle read by rows: T(n,k) = A060753(n)*k-A038110(n)*A286941(n,k).

Original entry on oeis.org

0, 1, 2, 1, 11, 2, 1, 8, 7, 14, 13, 4, 27, -18, 1, 4, 23, 26, 13, 32, 19, 22, 41, 44, 31, 18, 37, 24, 27, 46, 33, 36, 23, -6, -3, 16, 19, 38, 41, 12, -1, 2, -11, 8, 11, -2, 17, 4, -9, -6, 13, 16, 3, 22, 9, 12, 31, 34, 53, 8
Offset: 0

Views

Author

Jamie Morken, Aug 05 2019

Keywords

Comments

The sequence is Primorial rows of A308121.
Row n has length A005867(n).
Row n > 1 average value = A060753(n)/2.
Row n > 1 has sum = A002110(n-1)*A038110(n)/2.
First value on row(n) = A161527(n-1).
Last value on row(n) = A038110(n) for n > 2.
For n > 1, A060753(n) = Max(row) + Min(row).
For values x and y on row n > 1 at positions a and b on the row:
x + y = A060753(n), where a = A005867(n-1) - (b-1).
For n > 2 the penultimate value on row A002110(n) is given by
Related identity:
A038110(n)/A038111(n)*(Prime(n)^2) - (A038110(n)/A038111(n)*((A038110(n)*Prime(n) - A060753(n))*Prime(n)/A038110(n))) = 1.

Examples

			The triangle starts:
row1: 0;
row2: 1;
row3: 2, 1;
row4: 11, 2, 1, 8, 7, 14, 13, 4;
row5: 27, -18, 1, 4, 23, 26, 13, 32, 19, 22, 41, 44, 31, 18, 37, 24, 27, 46, 33, 36, 23, -6, -3, 16, 19, 38, 41, 12, -1, 2, -11, 8, 11, -2, 17, 4, -9, -6, 13, 16, 3, 22, 9, 12, 31, 34, 53, 8;
		

Crossrefs

Programs

  • Mathematica
    row[0] = 0; row[n_] := -(v = Numerator[Product[1 - 1/Prime[i], {i, 1, n}] / Prime[n]] * Select[Range[(p = Product[Prime[i], {i, 1, n}])], CoprimeQ[p, #] &]) + Denominator[Product[((pr = Prime[i]) - 1)/pr, {i, 1, n}]] * Range[Length[v]]; Table[row[n], {n, 0, 4}] // Flatten (* Amiram Eldar, Aug 10 2019 *)

A324550 Primes written in primorial base (A049345).

Original entry on oeis.org

10, 11, 21, 101, 121, 201, 221, 301, 321, 421, 1001, 1101, 1121, 1201, 1221, 1321, 1421, 2001, 2101, 2121, 2201, 2301, 2321, 2421, 3101, 3121, 3201, 3221, 3301, 3321, 4101, 4121, 4221, 4301, 4421, 5001, 5101, 5201, 5221, 5321, 5421, 6001, 6121, 6201, 6221, 6301, 10001, 10201, 10221, 10301, 10321, 10421, 11001, 11121, 11221
Offset: 1

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

Comments

When the primorial base representation is expressed with decimal digits as here, the sequence stays unambiguous only up to the 317th prime, 2099, written as 96421, because after that primorial base digits larger than 9 would be needed.
By writing down terms from a(6) to a(46) (primes 13 .. 199):
201, 221, 301, 321, 421, 1001, 1101, 1121, 1201, 1221, 1321, 1421, 2001, 2101, 2121, 2201, 2301, 2321, 2421, 3101, 3121, 3201, 3221, 3301, 3321, 4101, 4121, 4221, 4301, 4421, 5001, 5101, 5201, 5221, 5321, 5421, 6001, 6121, 6201, 6221, 6301,
and then from a(48) to a(80) (primes 223 .. 409):
10201, 10221, 10301, 10321, 10421, 11001, 11121, 11221, 11321, 11421, 12001, 12101, 12121, 12201, 12321, 13101, 13121, 13201, 13221, 14001, 14101, 14221, 14301, 14321, 14421, 15101, 15201, 15301, 15321, 15421, 16101, 16121, 16301,
it is clearly seen that if n is a prime, then p+n is also likely to be prime, where p is the next higher primorial (A002110) > n. See also A324656.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = Prime[n], p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; FromDigits[Reverse[s]]]; Array[a, 100] (* Amiram Eldar, Mar 06 2024 *)
  • PARI
    A324550(n) = A049345(prime(n)); \\ For A049345, see under that entry.

Formula

a(n) = A049345(A000040(n)).

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.

A286942 Irregular triangle read by rows: numbers 1 <= k <= (A002110(n) - 1) where gcd(k, A002110(n - 1)) = 1.

Original entry on oeis.org

1, 2, 1, 3, 5, 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 77, 79, 83, 89, 91, 97, 101, 103, 107, 109, 113, 119, 121, 127, 131, 133, 137, 139, 143, 149, 151, 157, 161, 163, 167, 169, 173
Offset: 1

Views

Author

Jamie Morken and Michael De Vlieger, May 16 2017

Keywords

Comments

From Michael De Vlieger, May 18 2017: (Start)
Row n of a(n) is the list of numbers 1 <= k <= A002110(n) that are coprime to A002110(n-1).
A286941(n) and A279864(n) are subsets of a(n) such that the terms of the rows of each sequence combined and sorted comprise all the terms of a(n).
Row lengths = A005867(n) + A005867(n-1): {2, 3, 10, 56, 528, 6240, 97920, ...}.
1 is coprime to all n thus delimits the rows of a(n).
The smallest prime q in row n of a(n) is gpf(primorial(n)) = A006530(A002110(n)) = prime(n) by definition of primorial.
The smallest composite x in row n of a(n) is q^2 = A001248(n).
The Kummer number A057588(n) = A002110(n) - 1 is the largest term in row n of a(n). (End)

Examples

			The triangle starts:
1, 2;
1, 3, 5;
1, 5, 7, 11, 13, 17, 19, 23, 25, 29
Example1:
To find row n of the irregular triangle A286942, take a running sum for each value in the irregular triangle row n-1 of A286941 with A002110(n-1) b-1 times, where b is the largest prime factor in A002110(n).
For example to find row 3 of A286942: Take a running sum for both 1 and 5 in row n-1 of A286941 with A002110(3-1)=6, 5-1=4 times, where b is the largest prime factor 5 in A002110(3).
Result:
1 5
7 11
13 17
19 23
25 29
Equal to row 3 of A286942: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29.
Example2:
To find row n of the irregular triangle A279864, multiply each value in row n-1 of A286941 with the largest prime factor b in A002110(n).
Example for n=3: b=5.
1*5=5
5*5=25
Example3:
To find row n of the irregular triangle A286941, remove the values that are in row n of the irregular triangle A279864 from the values that are in row n of the irregular triangle A286942.
For n=3.
A286942 row n = 1, 5, 7, 11, 13, 17, 19, 23, 25, 29.
A279864 row n = 5, 25.
Removing values 5, 25 from the values in A286942 row n gives row n of A286941: 1, 7, 11, 13, 17, 19, 23, 29.
		

Crossrefs

Programs

  • Mathematica
    Table[Select[Range@ #2, Function[k, CoprimeQ[k, #1]]] & @@ Map[Times @@ # &, {Most@ #, #}] &@ Prime@ Range@ n, {n, 4}] // Flatten (* Michael De Vlieger, May 18 2017 *)

Formula

a(n) = union(A286941(n), A279864(n)) where n consists of all terms in row n of each sequence. - Michael De Vlieger, May 18 2017

Extensions

More terms from Michael De Vlieger, May 18 2017

A329815 Number of distinct terms in the first difference sequence of the reduced residue system of the n-th primorial.

Original entry on oeis.org

0, 1, 3, 5, 7, 10, 13, 16, 20, 23, 29, 33, 37, 43, 49, 53, 59, 66, 75, 84, 92, 99, 108, 116, 127, 132, 140, 148, 156, 164, 174, 185, 193, 206, 215, 224, 235, 245, 255, 267, 275, 286, 297, 308
Offset: 1

Views

Author

Jamie Morken, Nov 21 2019

Keywords

Comments

This sequence is the number of distinct terms in the first difference sequence for rows n in A286941 and A309497.
Number of distinct terms listed in row n of A331118. - Michael De Vlieger, Jul 11 2020

Examples

			For n = 3, A002110(3) = 30, RRS = {1, 7, 11, 13, 17, 19, 23, 29}, dRRS = {6, 4, 2, 4, 2, 4, 6}, so a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    Primorial[n_] := Times @@ Prime[Range[n]]; Table[Length@ Union@ Differences@ Select[Range@ Primorial[n], CoprimeQ[#, Primorial[n]] &], {n, 7}] (* after Michael De Vlieger Jul 15 2017 from A061498 *)
  • PARI
    f(n) = {my(va = select(x->(gcd(n, x)==1), [1..n])); vd = vector(#va-1, k, va[k+1] - va[k]); #Set(vd); } \\ A061498
    a(n) = f(prod(i=1, n, prime(i))); \\ Michel Marcus, Dec 19 2019

Formula

a(n) = A061498(A002110(n)).
a(n) <= A048670(n)/2.

Extensions

a(12)-a(44) from Jamie Morken, Jul 11 2020 (after Mario Ziller)

A335334 Sum of the integers in the reduced residue system of A002110(n).

Original entry on oeis.org

1, 6, 120, 5040, 554400, 86486400, 23524300800, 8045310873600, 4070927302041600, 3305592969257779200, 3074201461409734656000, 4094836346597766561792000, 6715531608420337161338880000, 12128250084807128913378017280000
Offset: 1

Views

Author

Jamie Morken, Jun 02 2020

Keywords

Comments

Sum of the integers up to A002110(n) and coprime to A002110(n).
The sequence gives the sum of row n of A286941(n).

Examples

			For n = 3: A002110(3) = 30, the reduced residue system of 30 is {1, 7, 11, 13, 17, 19, 23, 29}. The sum is a(3) = 120.
		

Crossrefs

Programs

  • Mathematica
    n = 15;
    A002110 = Drop[FoldList[Times, 1, Prime[Range[n]]], 1];
    A005867 = Drop[EulerPhi@FoldList[Times, 1, Prime@Range@n], 1];
    A002110*A005867/2
    (* Second program: *)
    Map[# EulerPhi[#]/2 &, FoldList[Times, Prime@ Range@ 14]] (* Michael De Vlieger, Apr 07 2021 *)
  • PARI
    a(n) = my(P=factorback(primes(n))); P*eulerphi(P)/2; \\ Michel Marcus, Jun 02 2020

Formula

a(n) = A023896(A002110(n)).
a(n) = A002110(n)*A005867(n)/2 = A070826(n)*A005867(n).
a(n) = (A002110(n)*A038110(n+1)/2)*A058250(n).

A319148 Irregular triangle T(n,m) where row n lists differences m = j*p - r - 1, with iterator 1 <= j <= A002110(n), p = prime(n+1), and r is the smallest number that exceeds j*p that is coprime to A002110(n+1).

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 2, 3, 0, 3, 2, 1, 0, 1, 0, 3, 2, 3, 0, 1, 4, 5, 2, 1, 0, 1, 0, 3, 2, 1, 2, 1, 0, 3, 4, 1, 0, 5, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 2, 5, 4, 5, 2, 1, 2, 3, 0, 1, 0, 1, 4, 3, 4, 1, 2, 1, 2, 3, 0, 5, 0, 3, 2, 3, 0, 1, 0, 1, 2, 5, 0, 5, 2, 3, 2, 3, 0, 1, 0, 1, 4, 3, 4, 1, 0, 1
Offset: 1

Views

Author

Jamie Morken, Sep 11 2018

Keywords

Comments

Let p(i) be primes with p(1)=2, p(n)# the n-th primorial number, and h(n) the Jacobsthal function for primorial p(n)#. Conjecture: gcd(h(n), p(n+1)) = 1.
For a multiple m of a prime n, terms in this sequence give the number of contiguous numbers starting at m+1 which have at least one prime factor < n.
Consider a range s of the first n + 1 primes. Let p be the largest of these primes, i.e., A000040(n+1). Let P be the product of the first n primes, i.e., the primorial A002110(n), and let Q be the product of all the primes in s, i.e., the primorial A002110(n+1). Consider the reduced residue system R of primorial P, that is, those numbers 1 <= r < P such that gcd(r, P) = 1; therefore R = row n of A286941. For each n, we generate the multiples k = j*p, with 1 <= j <= P. For each k, we find the smallest residue r in R that exceeds k and take the difference m = r - k - 1. If no value in R exceeds k, then we use Q + 1 (which is also coprime to Q). Row n is thus a list of these m.
Alternatively, consider a multiple k = j*p, with 1 <= j <= P. We can compute m by iterating i such that the sum (i + k) is coprime to Q and subtracting 1. This technique is more efficient in terms of memory, as it does not require storing the reduced residue system of Q.
For n > 1: The penultimate value m on row n = A040976(n). The number of values m on row n is given by the sequence: 1,1,2,2,10,22,500,...
For n > 3: For any even x = m in row n, the number of x in row n is equal to the count of y in row n where y = x + 1. If x = 0, the count of x and y in row n = A000010(A002110(n-1)). For example, on row 4, A000010(A002110(4-1)) = 8, as 0 and 1 each occur 8 times on row 4. The sequence of counts of x and x+1 pairs on consecutive rows is given by the sequence A059861. For example, for x=0 and y=1 occurring 8 times on row 4, x=2 and y=3 occur 8-3=5 times on row 4 given by the value 3 in A059861. For example, for row 8, x=0 and y=1 occur A000010(A002110(8-1)) = 92160 times on row 8, and x=2 and y=3 occur 92160-22275=69885 times on row 8 given by the value 22275 in A059861.
For 3 < n < 9: The largest value on row n occurs twice, the pattern of occurrence is shown in table 1 of Ziller & Morack in the Links section.

Examples

			Triangle begins:
  0;
  1,0;
  1,0,1,2,3,0;
  3,2,1,0,1,0,3,2,3,0,1,4,5,2,1,0,1,0,3,2,1,2,1,0,3,4,1,0,5,0;
  ...
For n = 2, we have s = {2,3,5}, with p = prime(n+1) = 5, P = A002110(2) = 6, and Q = A002110(3) = 30. Then R = row n of A286941 = {1, 7, 11, 13, 17, 19, 23, 29} (we add 31 to this list since we are concerned with the residue that is larger than the largest k and since 31 is the ensuing number coprime to Q). The series of multiples k = j*p are the multiples 5j with 1 <= j <= P, thus {5, 10, 15, 20, 25, 30}. In R, the smallest residues that exceed the multiples k in the immediately aforementioned list are {7, 11, 17, 23, 29, 31}. The differences are {7 - 5, 11 - 10, 17 - 15, 23 - 20, 29 - 25, 31 - 30} or {2, 1, 2, 3, 4, 1}; subtracting one from each we have row 2 = {1, 0, 1, 2, 3, 0}.
For example, the third value on row n=20000 is 15, so all values in the range (3 * prime(20000) + i) to (3 * prime(20000) + i) for 1 <= i <= 15 have at least one prime factor <= prime(n).
		

Crossrefs

Programs

  • Mathematica
    rowToCreate = 3; (* create row n *)
    redundantDistanceToCheck = 1; (* set to 2 or higher to see n repeating
    patterns of length primorial[rowToCreate] *)
    Primorial[n_] := Times @@ Prime[Range[n]]
    rowValue = 0;
    primeToUse = Prime[rowToCreate];
    distanceToCheck1 = redundantDistanceToCheck*Primorial[rowToCreate];
    (* distanceToCheck1=rowToCreate*10000; *)(* uncomment this second option to create the first few values in very large rows up to rowToCreate=7000000000000 *)
    For[i = primeToUse, i < distanceToCheck1 + 1, i = i + primeToUse,
    For[x = i + 1, x < distanceToCheck1 + 2, x++,
    If[FactorInteger[x][[1, 1]] < primeToUse, rowValue++; , x =
    distanceToCheck1 + 2;
    Print[rowValue];
    rowValue = 0;
    ]]] (* Jamie Morken, Sep 11 2018 *)
    (* Program to check the number of composites referenced to row
    values: *)
    Row = 100;
    ColumnOnTheRow = 12;
    Print["composites>", ColumnOnTheRow*Prime[Row], "=",
    (NextPrime[ColumnOnTheRow*Prime[Row]]) -
    (ColumnOnTheRow*Prime[Row]) - 1];
    (* Second program: *)
    Table[Block[{s = Prime@ Range[n + 1], p, P, Q}, p = Last@ s; P = Times @@
    Most@ s; Q = Times @@ s; Array[Block[{k = 1}, While[! CoprimeQ[k + p #,
    Q], k++]; k - 1] &, P]], {n, 4}] // Flatten (* Michael De Vlieger, Sep 11 2018 *)

Formula

Length of row n = A002110(n - 1).
T(n,1) = A046933(n).
Number of unique or primitive values m in row n = A048670(n-1).
Showing 1-7 of 7 results.