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 21-30 of 39 results. Next

A276092 a(n) = Product_{i=1..n} prime(i)^(prime(i)-1), a(0)=1.

Original entry on oeis.org

1, 2, 18, 11250, 1323551250, 34329510752434301250, 799811863723341113907011901401250, 38919798565076223182552300534870824616780123359001250, 4052615498709835178737678586220586796222761283625319842830388618784835051250, 3679152532021669595137666762315244807517735994898621013565758767014111825486079213219685771368099483111250
Offset: 0

Views

Author

Antti Karttunen, Aug 22 2016

Keywords

Comments

Cumulative product of A036878 (after a(0)). - Rick L. Shepherd, Aug 23 2016

Examples

			For n=0 we have an empty product, thus a(0) = 1.
For n=1, a(1) = 2^1.
For n=2, a(2) = 2^1 * 3^2 = 18.
For n=3, a(3) = 2^1 * 3^2 * 5^4 = 11250.
		

Crossrefs

Subsequence of A048103.

Programs

  • Mathematica
    Table[Product[Prime[i]^(Prime[i] - 1), {i, n}], {n, 0, 9}] (* Michael De Vlieger, Aug 31 2016 *)
  • PARI
    A276092(n) = prod(i=1, n, prime(i)^(prime(i) - 1)) \\ Rick L. Shepherd, Aug 23 2016
  • Scheme
    (define (A276092 n) (let outloop ((i n) (t 1)) (if (zero? i) t (let ((p (A000040 i))) (let inloop ((j (- p 1)) (t t)) (if (zero? j) (outloop (- i 1) t) (inloop (- j 1) (* t p))))))))
    ;; Or as a recurrence:
    (definec (A276092 n) (if (zero? n) 1 (* (A276092 (- n 1)) (expt (A000040 n) (- (A000040 n) 1)))))
    

Formula

a(n) = Product_{i=1..n} prime(i)^(prime(i)-1).
a(0) = 1; and for n >= 1, a(n) = a(n-1) * A000040(n)^(A000040(n)-1).
a(n) = A276086(A057588(n)).

A328616 Number of digits in primorial base expansion of n that are maximal possible in their positions.

Original entry on oeis.org

0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 22 2019

Keywords

Examples

			In primorial base (see A049345), the maximum digit value that can occur in the k-th position from the right (with k=1 standing for the rightmost, i.e., the least significant digit position) is A000040(k)-1, and it is for the terms of A057588 (primorial numbers minus one) where all significant digits are maximal allowed for their positions, e.g. 209 is written as "6421" because 209 = 6*30 + 4*6 + 2*2 + 1*1, thus a(209) = 4.
87 is written as "2411" because 87 = 2*A002110(3) + 4*A002110(2) + 1*A002110(1) + 1*A002110(0) = 2*30 + 4*6 + 1*2 + 1*1. Only the digit positions 1 and 3 are occupied with maximum digits allowed in those positions (that are 1 and 4, being one less than the corresponding primes, 2 and 5), thus a(87) = 2.
		

Crossrefs

Cf. A057588 (positions of records, and the first occurrence of each n > 0).
Cf. also A260736.

Programs

  • Mathematica
    a[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; Count[Prime[Range[1, Length[s]]] - s, 1]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
  • PARI
    A328616(n) = { my(s=0, p=2); while(n, s += ((p-1)==(n%p)); n = n\p; p = nextprime(1+p)); (s); };

Formula

For all n >= 1, a(A057588(n)) = n.

A376411 a(n) is the number of terms less than A276086(n) in the range of A276086, where A276086 is the primorial base exp-function.

Original entry on oeis.org

0, 1, 2, 4, 6, 13, 3, 7, 11, 21, 32, 64, 18, 36, 54, 108, 162, 325, 90, 180, 271, 541, 812, 1624, 450, 902, 1354, 2707, 4061, 8122, 5, 10, 15, 30, 45, 91, 25, 50, 75, 151, 227, 454, 126, 253, 378, 758, 1137, 2274, 632, 1264, 1895, 3790, 5685, 11370, 3158, 6317, 9475, 18952, 28428, 56856, 35, 70, 106, 212, 318, 637
Offset: 0

Views

Author

Antti Karttunen, Nov 13 2024

Keywords

Comments

Number of terms of A048103 that are less than A276086(n).
Permutation of nonnegative integers.
Troughs are at primorials, A002110, and the local maxima occur just before, at A057588.

Crossrefs

Cf. A376413 (inverse permutation, but note the different offsets and ranges).
Cf. also A064273 (analogous permutation for base-2).

Programs

  • PARI
    up_to = (2*210)-1; \\ Must be one of the terms of A343048.
    A276085(n) = { my(f = factor(n), pr=1, i=1, s=0); for(k=1, #f~, while(i <= primepi(f[k, 1])-1, pr *= prime(i); i++); s += f[k, 2]*pr); (s); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A359550(n) = { my(pp); forprime(p=2, , pp = p^p; if(!(n%pp), return(0)); if(pp > n, return(1))); };
    A376411list(up_to) = { my(size=up_to, v=vector(size), m=A276086(size), s=1, j); for(i=2,m,if(!(m%i), j=A276085(i); v[j] = s; print1("i=",i," v[",j,"]=",s", ");); s += A359550(i)); (v); };
    v376411 = A376411list(up_to);
    A376411(n) = if(!n,n,v376411[n]);
    
  • PARI
    \\ For incremental computing, less efficient than above:
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A359550(n) = { my(pp); forprime(p=2, , pp = p^p; if(!(n%pp), return(0)); if(pp > n, return(1))); };
    memoA376411 = Map(); \\ We use k=A276086(n) as our key. kvs will be a list of key-value-pairs sorted into descending order by the key. We search the largest key in it < k, and continue summing from that:
    A376411(n) = if(n<=2,n,my(v, k=A276086(n)); if(mapisdefined(memoA376411,k,&v), v, my(kvs = vecsort(Mat(memoA376411)~,(x,y) -> sign(y[1]-x[1])), ss=si=0); for(i=1, #kvs, if(kvs[1,i]A359550(i)); mapput(memoA376411,k,v); (v)));

Formula

a(n) = A377982(A276086(n))-1 = Sum_{i=1 .. A276086(n)-1} A359550(i).
For all n >= 1, a(A376413(n)) = n-1, and for all n >= 0, A376413(1+a(n)) = n.
a(i)/a(j) ~ A276086(i)/A276086(j), and particularly, a(2*n+1) ~ 2*a(2*n).

A286615 Square array A(n,k) = A276945(n,k)-1, read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

0, 1, 2, 5, 7, 3, 29, 35, 11, 4, 209, 239, 59, 13, 6, 2309, 2519, 419, 65, 31, 8, 30029, 32339, 4619, 449, 215, 37, 9, 510509, 540539, 60059, 4829, 2339, 245, 41, 10, 9699689, 10210199, 1021019, 62369, 30239, 2549, 269, 43, 12, 223092869, 232792559, 19399379, 1051049, 512819, 32549, 2729, 275, 61, 14
Offset: 1

Views

Author

Antti Karttunen, Jun 30 2017

Keywords

Comments

A permutation of nonnegative integers.

Examples

			The top left 8 X 15 corner of the array:
   0,  1,   5,   29,   209,    2309,    30029,    510509
   2,  7,  35,  239,  2519,   32339,   540539,  10210199
   3, 11,  59,  419,  4619,   60059,  1021019,  19399379
   4, 13,  65,  449,  4829,   62369,  1051049,  19909889
   6, 31, 215, 2339, 30239,  512819,  9729719, 223603379
   8, 37, 245, 2549, 32549,  542849, 10240229, 233303069
   9, 41, 269, 2729, 34649,  570569, 10720709, 242492249
  10, 43, 275, 2759, 34859,  572879, 10750739, 243002759
  12, 61, 425, 4649, 60269, 1023329, 19429409, 446696249
  14, 67, 455, 4859, 62579, 1053359, 19939919, 456395939
  15, 71, 479, 5039, 64679, 1081079, 20420399, 465585119
  16, 73, 485, 5069, 64889, 1083389, 20450429, 466095629
  17, 89, 629, 6929, 90089, 1531529, 29099069, 669278609
  18, 91, 635, 6959, 90299, 1533839, 29129099, 669789119
  19, 95, 659, 7139, 92399, 1561559, 29609579, 678978299
		

Crossrefs

Transpose: A286616.
One less than A276945.
Row 1: A057588.

Programs

Formula

A(n,k) = A276945(n,k)-1.

A321683 Numbers with distinct digits in primorial base.

Original entry on oeis.org

0, 1, 2, 4, 5, 10, 13, 14, 19, 20, 22, 23, 25, 26, 28, 29, 52, 58, 79, 80, 85, 86, 95, 100, 103, 104, 115, 116, 118, 119, 125, 130, 133, 134, 139, 140, 142, 143, 155, 160, 163, 164, 169, 170, 172, 173, 175, 176, 178, 179, 185, 190, 193, 194, 199, 200, 202, 203
Offset: 1

Views

Author

Rémy Sigrist, Nov 17 2018

Keywords

Comments

This sequence is a variant of A010784 (numbers with distinct digits in decimal). The final term of that sequence is 9876543210. This sequence, by contrast, has infinitely many terms (for example, all the terms of A057588 belong to this sequence).

Examples

			13 in primorial base is 201, which has no repeated digits, hence 13 is in the sequence.
14 in primorial base is 210, which has no repeated digits, hence 14 is also in the sequence.
15 in primorial base is 211, so 15 is not in the sequence on account of the digit 1 appearing twice in its primorial base representation.
		

Crossrefs

See A321682 for the factorial base variant.

Programs

  • Mathematica
    q[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; UnsameQ @@ s]; Select[Range[0, 210], q] (* Amiram Eldar, Mar 13 2024 *)
  • PARI
    is(n) = my (s=0); forprime (p=2, oo, if (n==0, return (1)); my (d=n%p); if (bittest(s,d), return (0), s+=2^d; n\=p))

A366809 The sum of the divisors of prime(n)#-1 where p# is the product of all the primes from 2 to p inclusive.

Original entry on oeis.org

1, 6, 30, 240, 2310, 30030, 518940, 9943560, 230876448, 6551588160, 200561595684, 7471933410000, 304250263527210, 13082853940673340, 618109122639794688, 32589631537463089128, 1922760350251477679196, 117386696543681561301312, 7906535060701218163040640
Offset: 1

Views

Author

Sean A. Irvine, Oct 23 2023

Keywords

Examples

			a(4)=240 because the divisors of 7#-1 = 209 are {1, 11, 19, 209}.
		

Crossrefs

Programs

  • Maple
    seq(numtheory[sigma](mul(ithprime(k), k=1..n)-1), n=1..30);

Formula

a(n) = sigma(prime(n)#-1) = A000230(A057588(n)).

A125191 Primes of the form k# + (k+1)# +- 1, where k# = A002110(k) = primorial(k).

Original entry on oeis.org

2, 7, 37, 239, 241, 2521, 32341, 540539, 540541, 232792559, 232792561, 207030183359, 311671001662019, 41287621429375723111588738861, 5801527386969669153864265802424086050777441586253956297278498679
Offset: 1

Views

Author

Tomas Xordan, Jan 12 2007

Keywords

Comments

Prime numbers of the form (prime(k+1) + 1)*k# +- 1.

Examples

			Let k = 1; then 1#+2# = 2+6 = 8, 8-1 = 7 is prime (hence a term of the sequence) but 8+1 = 9 is nonprime.
Let k = 3; then 3#+4# = 30+210 = 240, 240-1 = 239 is prime and 240+1 = 241 is also prime, so both are terms.
		

Crossrefs

Cf. A002110 (primorial numbers), A006862 (Euclid numbers), A057588 (Kummer numbers).

Programs

  • Maple
    A002110 := 1 : A000040 := 2 : for n from 1 to 38 do if isprime(A002110*(1+A000040)-1) then printf("%d,",A002110*(1+A000040)-1) ; fi ; if isprime(A002110*(1+A000040)+1) then printf("%d,",A002110*(1+A000040)+1) ; fi ; A002110 := A002110*A000040 : A000040 := nextprime(A000040) : od : # R. J. Mathar, Jan 26 2007
  • Mathematica
    plim=45;k= FoldList[Times, 1, Prime[Range[plim]]];m=Table[k[[l]]+k[[l+1]],{l,plim}];Sort[Select[Join[m+1,m-1],PrimeQ]] (* James C. McMahon, Dec 15 2024 *)
    Join[{2},Select[Sort[Flatten[#+{1,-1}&/@(Total/@Partition[FoldList[Times,Prime[Range[40]]],2,1])]],PrimeQ]] (* Harvey P. Dale, Jul 15 2025 *)
  • PARI
    {m=37;for(n=0,m,p=primorial(n)+primorial(n+1);if(isprime(a=p-1),print1(a,","));if(isprime(a=p+1),print1(a,",")))} \\ Klaus Brockhaus, Jan 25 2007
    
  • PARI
    genit(maxx)={arr=List();for(n=0, maxx, p=factorback(primes(n))+factorback(primes(n+1));if(ispseudoprime(p-1),listput(arr,p-1));if(ispseudoprime(p+1),listput(arr,p+1)));arr} \\ Bill McEachen, Jun 21 2021 (from David A. Corneth's code at A002110)

Extensions

Edited, corrected and extended by Klaus Brockhaus and R. J. Mathar, Jan 25 2007

A286616 Transpose of square array A286615.

Original entry on oeis.org

0, 2, 1, 3, 7, 5, 4, 11, 35, 29, 6, 13, 59, 239, 209, 8, 31, 65, 419, 2519, 2309, 9, 37, 215, 449, 4619, 32339, 30029, 10, 41, 245, 2339, 4829, 60059, 540539, 510509, 12, 43, 269, 2549, 30239, 62369, 1021019, 10210199, 9699689, 14, 61, 275, 2729, 32549, 512819, 1051049, 19399379, 232792559, 223092869
Offset: 1

Views

Author

Antti Karttunen, Jun 30 2017

Keywords

Comments

A permutation of nonnegative integers.

Examples

			The top left 7 X 7 corner of the array:
      0,      2,       3,       4,       6,        8,        9
      1,      7,      11,      13,      31,       37,       41
      5,     35,      59,      65,     215,      245,      269
     29,    239,     419,     449,    2339,     2549,     2729
    209,   2519,    4619,    4829,   30239,    32549,    34649
   2309,  32339,   60059,   62369,  512819,   542849,   570569
  30029, 540539, 1021019, 1051049, 9729719, 10240229, 10720709
		

Crossrefs

Transpose: A286615.
One less than A276943.
Column 1: A057588.

Programs

Formula

A(n,k) = A286615(k,n) = A276943(n,k)-1.

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

A341812 Primes p such that p#-1 is divisible by the next prime after p.

Original entry on oeis.org

3, 7, 176078267
Offset: 1

Views

Author

Jeppe Stig Nielsen, Feb 20 2021

Keywords

Comments

Here p# means A034386(p).
The next prime after p is then in A341804.

Examples

			The prime 7 is a member of this sequence because 2*3*5*7-1=209 is divisible by 11, the next prime immediately following 7.
11 is NOT a member of this sequence because 2*3*5*7*11-1=2309 is not divisible by 13 (leaves a remainder of 8), the next prime after 11.
		

Crossrefs

Programs

  • PARI
    isok(p) = if (isprime(p), my(a=Mod(1,nextprime(1+p))); forprime(q=2,p,a*=q); (a == 1)); \\ Michel Marcus, Mar 03 2021
Previous Showing 21-30 of 39 results. Next