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.

A080087 Number of factors of 5 in the factorial of the n-th prime, counted with multiplicity.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 9, 10, 12, 13, 14, 15, 16, 16, 18, 19, 20, 22, 24, 24, 25, 25, 26, 31, 32, 33, 33, 35, 37, 38, 39, 40, 41, 43, 44, 46, 46, 47, 47, 51, 53, 55, 55, 56, 57, 58, 62, 63, 64, 65, 66, 68, 69, 69, 71, 75, 76, 76, 77, 81, 82, 84, 84, 86, 87, 89, 90
Offset: 1

Views

Author

Paul D. Hanna, Jan 26 2003

Keywords

Comments

Highest power of 5 dividing prime(n)! = A039716(n), or also the number of trailing end 0's in A039716(n). - Lekraj Beedassy, Oct 31 2010

Crossrefs

Programs

  • Maple
    R:= NULL: v:= 0: p:= 0:
    for i from 1 to 100 do
       q:= p;
       p:= nextprime(p);
       v:= v + add(1+padic:-ordp(x,5), x = 1+floor(q/5) .. floor(p/5));
       R:= R,v;
    od:
    R; # Robert Israel, Sep 27 2023
  • Mathematica
    lst={};Do[p=Prime[n];s=0;While[p>1,p=IntegerPart[p/5];s+=p;];AppendTo[lst,s],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 28 2009 *)
  • PARI
    a(n) = valuation(prime(n)!, 5); \\ Michel Marcus, Jan 15 2015

Formula

a(n) = Sum_{k=1..L} floor(prime(n)/5^k), where L = log(p_n)/log(5).
a(n) = A112765(A039716(n)). - Michel Marcus, Sep 28 2023

A080084 Number of prime factors in the factorial of the n-th prime, counted with multiplicity.

Original entry on oeis.org

1, 2, 5, 8, 16, 20, 29, 33, 41, 56, 60, 76, 85, 89, 98, 114, 129, 134, 151, 160, 166, 180, 192, 207, 229, 240, 244, 254, 260, 271, 308, 321, 338, 342, 369, 374, 391, 409, 418, 435, 451, 457, 484, 492, 502, 507, 541, 572, 585, 590, 601, 616, 623, 653, 674, 689
Offset: 1

Views

Author

Paul D. Hanna, Jan 26 2003

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, 0,
          b(n-1)+numtheory[bigomega](n))
        end:
    a:= n-> b(ithprime(n)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Jul 05 2019
  • Mathematica
    PrimeOmega[#!]&/@Prime[Range[60]] (* Harvey P. Dale, Nov 09 2011 *)

Formula

a(n) = Sum_{m=1..n} Sum_{k=1..L} floor( p_n /(p_m)^k ), where L = ceiling( log(p_n)/log(p_m) ).

A080086 Number of factors of 3 in the factorial of the n-th prime, counted with multiplicity.

Original entry on oeis.org

0, 1, 1, 2, 4, 5, 6, 8, 9, 13, 14, 17, 18, 19, 21, 23, 27, 28, 31, 32, 34, 36, 40, 42, 46, 48, 49, 50, 53, 54, 61, 62, 66, 67, 71, 72, 75, 80, 81, 84, 86, 88, 93, 94, 95, 97, 102, 108, 110, 111, 112, 115, 116, 123, 126, 129, 131, 134, 136, 138, 139, 143, 151, 152, 153
Offset: 1

Views

Author

Paul D. Hanna, Jan 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];s=0;While[p>1,p=IntegerPart[p/3];s+=p;];AppendTo[lst,s],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 28 2009 *)
    Join[{0},FactorInteger[#][[2,2]]&/@(Prime[Range[2,70]]!)] (* Harvey P. Dale, Sep 05 2014 *)

Formula

a(n) = sum_{k=1..L} floor(prime(n) / 3^k), where L = log(p_n)/log(3).

A371151 Numbers k >= 2 such that A362333(k)-A371148(k)/A371149(k) sets a new maximum.

Original entry on oeis.org

2, 80, 224, 5632, 26624, 1114112, 2490368, 24117248
Offset: 1

Views

Author

Pontus von Brömssen, Mar 13 2024

Keywords

Comments

The corresponding maxima are: 0, 2/3, 3/4, 7/8, 9/10, 14/15, 15/16, 18/19, ... .
All terms after a(1) = 2 are in A371150.
Apparently, a(n) = 2^(A080085(n+1)+1)*prime(n+1) for n >= 2, with corresponding maxima 1 - 1/A080085(n+1).

Crossrefs

A379008 Square array A(n, k) = A294898(A246278(n, k)), read by falling antidiagonals; Difference A005187(n)-A000203(n) applied to the prime shift array.

Original entry on oeis.org

0, 0, 0, -2, 3, 2, 0, 2, 16, 3, 0, 10, 19, 38, 7, -6, 7, 88, 54, 104, 9, 1, 8, 33, 280, 113, 151, 14, 0, 16, 96, 65, 1192, 184, 268, 15, -5, 38, 44, 389, 152, 2009, 282, 336, 18, -4, 22, 464, 88, 1279, 207, 4600, 388, 502, 24, 5, 16, 142, 1996, 174, 2445, 345, 6470, 608, 806, 25, -14, 18, 174, 623, 13170, 257, 4834, 497, 11605, 833, 924, 33
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Comments

Question: Are all columns increasing, and strictly increasing after the leftmost column?

Examples

			The top left corner of the array:
k=  |  1    2    3      4    5      6    7       8      9     10   11      12
2k= |  2    4    6      8   10     12   14      16     18     20   22      24
----+-------------------------------------------------------------------------
1   |  0,   0,  -2,     0,   0,    -6,   1,      0,    -5,    -4,   5,    -14,
2   |  0,   3,   2,    10,   7,     8,  16,     38,    22,    16,  18,     26,
3   |  2,  16,  19,    88,  33,    96,  44,    464,   142,   174,  58,    495,
4   |  3,  38,  54,   280,  65,   389,  88,   1996,   623,   469, 103,   2737,
5   |  7, 104, 113,  1192, 152,  1279, 174,  13170,  1516,  1717, 211,  14102,
6   |  9, 151, 184,  2009, 207,  2445, 257,  26172,  3208,  2756, 328,  31850,
7   | 14, 268, 282,  4600, 345,  4834, 439,  78295,  5406,  5916, 473,  82285,
8   | 15, 336, 388,  6470, 497,  7455, 533, 123071,  9035,  9501, 638, 141745,
9   | 18, 502, 608, 11605, 653, 14081, 784, 267115, 17773, 15097, 870, 324077,
Here 0's occur also after the first row. For example column 30, which corresponds with numbers 60, 315, 1925, 7007, 26741, ..., begins as -52, 0, 868, 4428, 19958, etc. See also A295296.
		

Crossrefs

Cf. A080085 (column 1, incremented by one).
Cf. also array A378979, and A324348 (another permutation of A294898).

Programs

  • PARI
    up_to = 11325; \\ = binomial(150+1,2)
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A294898(n) = (A005187(n)-sigma(n));
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A379008sq(row,col) = A294898(A246278sq(row,col));
    A379008list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A379008sq(col,(a-(col-1))))); (v); };
    v379008 = A379008list(up_to);
    A379008(n) = v379008[n];

A276133 Exponent of highest power of 2 dividing the product of the composite numbers between the n-th prime and the (n+1)-st prime.

Original entry on oeis.org

0, 2, 1, 4, 2, 5, 1, 3, 6, 1, 8, 4, 1, 3, 7, 5, 2, 8, 3, 3, 4, 5, 6, 9, 3, 1, 4, 2, 5, 11, 8, 6, 1, 10, 1, 6, 7, 3, 6, 6, 2, 8, 6, 3, 1, 12, 10, 6, 2, 4, 4, 4, 8, 11, 4, 6, 1, 7, 4, 1, 11, 13, 3, 3, 3, 15, 7, 8, 2, 6, 4, 7, 7, 5, 3, 10, 7, 5, 7
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 29 2016

Keywords

Crossrefs

Supersequence of A205649 (Hamming distance between twin primes).
First differences of A080085.

Programs

  • Maple
    A:= Vector(100): q:= 2:
    for n from 1 to 100 do
      p:= q; q:= nextprime(q);
      t:= 0;
      for i from p+1 to q-1 do t:= t + padic:-ordp(i,2) od;
      A[n]:= t
    od:
    convert(A,list); # Robert Israel, Apr 11 2021
  • Mathematica
    IntegerExponent[#,2]&/@(Times@@Range[#[[1]]+1,#[[2]]-1]&/@Partition[ Prime[ Range[ 80]],2,1]) (* Harvey P. Dale, Aug 12 2024 *)
  • PARI
    a(n) = valuation(prod(k=prime(n)+1, prime(n+1)-1, k), 2); \\ Michel Marcus, Aug 31 2016
    
  • PARI
    a(n) = my(p=prime(n+1),q=prime(n)); p-hammingweight(p) - (q-hammingweight(q)); \\ Kevin Ryde, Apr 11 2021
    
  • Python
    from sympy import prime
    def A276133(n): return (p:=prime(n+1)-1)-p.bit_count()-(q:=prime(n))+q.bit_count() # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A007814(A061214(n)).
a(n+1) = Sum_{k = A000040(n+1)..A000040(n+2)} A007814(k).

Extensions

a(16) corrected by Robert Israel, Apr 11 2021

A163464 Cumulative sum of a repeated shift-and-add operation on the base-7 representation of prime(n).

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 8, 9, 9, 10, 11, 11, 12, 12, 13, 14, 16, 16, 17, 17, 18, 20, 20, 21, 21, 24, 24, 25, 26, 26, 27, 28, 28, 30, 30, 32, 32, 34, 35, 36, 36, 37, 38, 38, 40, 41, 42, 43, 43, 44, 45, 45, 46, 49, 50, 50, 51, 53, 54, 57, 57, 58, 59, 60, 61, 62
Offset: 1

Views

Author

Keywords

Comments

Starting from the base-7 representation of prime(n) = d_m*7^m + ... + d_3*7^3 + d_2*7^2 + d_1*7 + d_0, the least-significant digit is recursively removed (a shift-right operation in base 7), and the intermediate numbers are all added up:
a(n) = (d_m*7^(m-1) + ... + d_3*7^2 + d_2*7 + d_1)
+ (d_m*7^(m-2) + ... + d_4*7^2 + d_3*7 + d_2)
+ (d_m*7^(m-3) + ... + d_4*7 + d_3)
+ ... + d_m
= Sum_{j=1..m} d_j*(7^j - 1)/6.

Crossrefs

Programs

  • Maple
    shiftadd := proc(n,b) dgs := convert(n,base,b) ; add( op(i,dgs)*(b^(i-1)-1),i=2..nops(dgs))/(b-1) ; end:
    A163464 := proc(n) shiftadd(ithprime(n),7) ; end:
    seq(A163464(n),n=1..40) ; # R. J. Mathar, Aug 02 2009
  • Mathematica
    lst={}; Do[p=Prime[n]; s=0; While[p>1,p=IntegerPart[p/7];s+=p;]; AppendTo[lst, s],{n,6!}]; lst

Extensions

Definition rewritten by R. J. Mathar, Aug 02 2009
Showing 1-7 of 7 results.