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

A074037 Sum of the composites between the smallest prime factor of n and the largest prime factor of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 10, 4, 0, 0, 0, 0, 4, 10, 37, 0, 0, 0, 49, 0, 10, 0, 4, 0, 0, 37, 94, 6, 0, 0, 112, 49, 4, 0, 10, 0, 37, 4, 175, 0, 0, 0, 4, 94, 49, 0, 0, 33, 10, 112, 305, 0, 4, 0, 335, 10, 0, 45, 37, 0, 94, 175, 10, 0, 0, 0, 505, 4, 112, 27, 49, 0, 4, 0, 622, 0, 10
Offset: 1

Views

Author

Jason Earls, Sep 15 2002

Keywords

Comments

Record values (A079725) occur at 2*primes (A001747).

Examples

			a(14) = 10 because 2*7 = 14 and 4 + 6 = 10.
		

Programs

  • Maple
    with(numtheory): a:=proc(n) local nf,nnf,s,j: nf:=factorset(n): nnf:=nops(nf): s:=0: for j from nf[1] to nf[nnf] do if isprime(j)=false then s:=s+j else s:=s: fi: od: s: end: 0,seq(a(n),n=2..84); # Emeric Deutsch
  • Mathematica
    sc[n_]:=Module[{pfacs=Transpose[FactorInteger[n]][[1]],a,b}, a=Min[ pfacs]+1; b=Max[pfacs]-1;Total[Select[Range[a,b],!PrimeQ[#]&]]]; Array[sc,90] (* Harvey P. Dale, Nov 14 2011 *)

A079950 Triangle of n-th prime modulo twice primes less n-th prime.

Original entry on oeis.org

2, 3, 3, 1, 5, 5, 3, 1, 7, 7, 3, 5, 1, 11, 11, 1, 1, 3, 13, 13, 13, 1, 5, 7, 3, 17, 17, 17, 3, 1, 9, 5, 19, 19, 19, 19, 3, 5, 3, 9, 1, 23, 23, 23, 23, 1, 5, 9, 1, 7, 3, 29, 29, 29, 29, 3, 1, 1, 3, 9, 5, 31, 31, 31, 31, 31, 1, 1, 7, 9, 15, 11, 3, 37, 37, 37, 37, 37, 1, 5, 1, 13, 19, 15, 7, 3, 41
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 19 2003

Keywords

Comments

The right border of the triangle are the primes: T(n,n)=A000040(n); T(n,1)=A039702(n), T(n,2)=A039704(n) for n>1, T(n,3)=A007652(n) for n>2, T(n,4)=A039712(n) for n>3;

Examples

			Triangle begins:
  2;
  3, 3;
  1, 5, 5;
  3, 1, 7,  7;
  3, 5, 1, 11, 11;
  1, 1, 3, 13, 13, 13;
  1, 5, 7,  3, 17, 17, 17;
  ...
		

Crossrefs

Programs

  • Maple
    A079950 := proc(n,k)
        modp(ithprime(n),2*ithprime(k)) ;
    end proc:
    seq(seq(A079950(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Sep 28 2017
  • PARI
    T(n,k) = prime(n) % (2*prime(k));
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n,k), ", ")); print); \\ Michel Marcus, Sep 21 2017

Formula

T(n, k) = prime(n) mod 2*prime(k), 1<=k<=n.

A098764 a(n) = 3p - q where p and q are consecutive primes.

Original entry on oeis.org

3, 4, 8, 10, 20, 22, 32, 34, 40, 56, 56, 70, 80, 82, 88, 100, 116, 116, 130, 140, 140, 154, 160, 170, 190, 200, 202, 212, 214, 212, 250, 256, 272, 268, 296, 296, 308, 322, 328, 340, 356, 352, 380, 382, 392, 386, 410, 442, 452, 454, 460, 476, 472, 496, 508, 520
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 30 2004

Keywords

Comments

Except for the initial term, a(n)=={2, 4} mod 6.
Not monotonic: a(29) = 214 > 212 = a(30), a(33) = 272 > 268 = a(34), etc. - Charles R Greathouse IV, Jun 03 2013

Crossrefs

Programs

  • Mathematica
    ListConvolve[{-1,3},Prime[Range[100]]] (* Paolo Xausa, Nov 02 2023 *)
  • PARI
    a(n) = 3*prime(n) - prime(n+1) \\ Michel Marcus, Jun 03 2013

Formula

a(n) = A001043(n) - 2*A001223(n).
a(n) = 3*A000040(n)-A000040(n+1) = A001748(n)-A000040(n+1) = A001747(n+1)-A001223(n). - R. J. Mathar, Apr 22 2010
a(n) ~ 2n log n. - Charles R Greathouse IV, Jun 03 2013
a(n) = A100021(n) + 3. - Hugo Pfoertner, Nov 02 2023
a(n) = A062234(n) + A000040(n). - Anthony S. Wright, Feb 19 2024

Extensions

Corrected (116 duplicated) by R. J. Mathar, Apr 22 2010

A112773 3 together with primes multiplied by 3.

Original entry on oeis.org

3, 6, 9, 15, 21, 33, 39, 51, 57, 69, 87, 93, 111, 123, 129, 141, 159, 177, 183, 201, 213, 219, 237, 249, 267, 291, 303, 309, 321, 327, 339, 381, 393, 411, 417, 447, 453, 471, 489, 501, 519, 537, 543, 573, 579, 591, 597, 633, 669, 681, 687, 699, 717, 723, 753
Offset: 1

Views

Author

Jonathan Vos Post and Ray Chandler, Oct 15 2005

Keywords

Comments

3 times the noncomposite numbers (see formula). Also column 2 of A272400. - Omar E. Pol, Apr 29 2016

Crossrefs

Essentially the same as A001748.

Programs

Formula

a(n) = 3*A008578(n). - Omar E. Pol, Jan 31 2012

Extensions

Edited by N. J. A. Sloane, Apr 28 2008 at the suggestion of Alexander R. Povolotsky

A382255 Heinz number of the partition corresponding to run lengths in the bits of n.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 6, 5, 10, 12, 16, 12, 9, 12, 10, 7, 14, 20, 24, 18, 24, 32, 24, 20, 15, 18, 24, 18, 15, 20, 14, 11, 22, 28, 40, 30, 36, 48, 36, 30, 40, 48, 64, 48, 36, 48, 40, 28, 21, 30, 36, 27, 36, 48, 36, 30, 25, 30, 40, 30, 21, 28, 22, 13, 26, 44, 56, 42
Offset: 0

Views

Author

M. F. Hasler and Ali Sada, Mar 19 2025

Keywords

Comments

The run lengths (number of consecutive bits that are equal) in the binary numbers in [2^(L-1), 2^L-1], i.e., of bit length L, yield all possible compositions of L, i.e., the partitions with any possible order of the parts.
Associated to any composition (p1, ..., pK) is their Heinz number prime(p1)*...*prime(pK) which depends only on the partition, i.e., not on the order of the parts.
The sequence can also be read as a table with row lengths 1, 1, 2, 4, 8, 16, 32, ... (= A011782), where row L = 0, 1, 2, 3, ... lists the 2^(L-1) compositions of L through their Heinz numbers (which will appear more than once if they contain at least two distinct parts).

Examples

			   n | binary | partition | a(n) = Heinz number
  ---+--------+-----------+--------------------
   0 |   (0)  | empty sum | 1 = empty product
   1 |     1  |     1     | 2 = prime(1)
   2 |    10  |    1+1    | 4 = prime(1) * prime(1)
   3 |    11  |     2     | 3 = prime(2)
   4 |   100  |    1+2    | 6 = prime(1) * prime(2)
   5 |   101  |   1+1+1   | 8 = 2^3 = prime(1) * prime(1) * prime(1)
   6 |   110  |    2+1    | 6 = prime(2) * prime(1)
   7 |   111  |     3     | 5 = prime(3)
   8 |  1000  |    1+3    | 10 = 2*5 = prime(1) * prime(3)
   9 |  1001  |   1+2+1   | 12 = 2^2*3 = prime(1) * prime(2) * prime(1)
  ...|   ...  |    ...    | ...
For example, n = 4 = 100[2] (in binary) has run lengths (1, 2), namely: one bit 1 followed by two bits 0. This gives a(4) = prime(1)*prime(2) = 6.
Next, n = 5 = 101[2] (in binary) has run lengths (1, 1, 1): one bit 1, followed by one bit 0, followed by one bit 1. This gives a(4) = prime(1)^3 = 8.
Then, n = 6 = 110[2] (in binary) has run lengths (2, 1): first two bits 1, then one bit 0. This is the same as for 4, just in reverse order, so it yields the same Heinz number a(6) = prime(2)*prime(1) = 6.
Then, n = 7 = 111[2] (in binary) has run lengths (3), namely: three bits 1. This gives a(5) = prime(3) = 5.
Sequence written as irregular triangle:
   1;
   2;
   4,  3;
   6,  8,  6,  5;
  10, 12, 16, 12,  9, 12, 10,  7;
  14, 20, 24, 18, 24, 32, 24, 20, 15, 18, 24, 18, 15, 20, 14, 11;
  ...
		

Crossrefs

Cf. A112798 and A296150 (partitions sorted by Heinz number).
Cf. A185974, A334433, A334435, A334438, A334434, A129129, A334436 (partitions given as Heinz numbers, in Abramowitz-Stegun, Maple, Mathematica order).
For "constructive" lists of partitions see A036036 (Abramowitz and Stegun order), A036036 (reversed), A080576 (Maple order), A080577 (Mathematica order).
Row sums of triangle give A030017(n+1).
Cf. A007088 (the binary numbers).
Cf. A101211 (the run lengths as rows of a table).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 1+n, (p->
          a(iquo(n, 2^p))*ithprime(p))(padic[ordp](n+(n mod 2), 2)))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 20 2025
  • PARI
    Heinz(p)=vecprod([ prime(k) | k <- p ])
    RL(v) = if(#v, v=Vec(select(t->t,concat([1,v[^1]-v[^-1],1]),1)); v[^1]-v[^-1])
    apply( {A382255(n) = Heinz(RL(binary(n)))}, [0..99] )

Formula

a(2^n) = A001747(n+1).
a(2^n-1) = A008578(n+1).
a(2^n+1) = A001749(n-1) for n>=2.

A073704 Smallest prime p such that also p-prime(n)*2 is a prime.

Original entry on oeis.org

7, 11, 13, 17, 29, 29, 37, 41, 53, 61, 67, 79, 89, 89, 97, 109, 131, 127, 137, 149, 149, 163, 173, 181, 197, 233, 211, 227, 223, 229, 257, 269, 277, 281, 311, 307, 317, 331, 337, 349, 389, 367, 389, 389, 397, 401, 433, 449, 457, 461, 479, 491, 487, 509, 521
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 04 2002

Keywords

Crossrefs

A309131 Triangle read by rows: T(n, k) = (n - k)*prime(1 + k), with 0 <= k < n.

Original entry on oeis.org

2, 4, 3, 6, 6, 5, 8, 9, 10, 7, 10, 12, 15, 14, 11, 12, 15, 20, 21, 22, 13, 14, 18, 25, 28, 33, 26, 17, 16, 21, 30, 35, 44, 39, 34, 19, 18, 24, 35, 42, 55, 52, 51, 38, 23, 20, 27, 40, 49, 66, 65, 68, 57, 46, 29, 22, 30, 45, 56, 77, 78, 85, 76, 69, 58, 31
Offset: 1

Views

Author

Stefano Spezia, Jul 14 2019

Keywords

Comments

T(n, k) is the k-superdiagonal sum of an n X n Toeplitz matrix M(n) whose first row consists of successive prime numbers prime(1), ..., prime(n).
The h-th subdiagonal of the triangle T gives the primes multiplied by (h + 1).
The k-th column of the triangle T gives the multiples of prime(1 + k).
Also array A(n, k) = n*prime(1 + k) read by ascending antidiagonals, with 0 <= k < n. - Michel Marcus, Jul 15 2019

Examples

			The triangle T(n, k) begins:
---+-----------------------------------------------------
n\k|    0     1     2     3     4     5     6     7     8
---+-----------------------------------------------------
1  |    2
2  |    4     3
3  |    6     6     5
4  |    8     9    10     7
5  |   10    12    15    14    11
6  |   12    15    20    21    22    13
7  |   14    18    25    28    33    26    17
8  |   16    21    30    35    44    39    34    19
9  |   18    24    35    42    55    52    51    38    23
...
For n = 3 the matrix M(3) is
          2,         3,         5
    M_{2,1},         2,         3
    M_{3,1},   M_{3,2},         2
and therefore T(3, 0) = 2 + 2 + 2 = 6, T(3, 1) = 3 + 3 = 6, and T(3, 2) = 5.
		

Crossrefs

Cf. A000040: diagonal; A001747: 1st subdiagonal; A001748: 2nd subdiagonal; A001749: 3rd subdiagonal; A001750: 4th subdiagonal; A005843: 0th column; A008585: 1st column; A008587: 2nd column; A008589: 3rd column; A008593: 4th column; A008595: 5th column; A008599: 6th column; A008601: 7th column; A014148: row sums; A138636: 5th subdiagonal; A272470: 6th subdiagonal.

Programs

  • Magma
    [[(n-k)*NthPrime(1+k): k in [0..n-1]]: n in [1..11]]; // triangle output
    
  • Maple
    a:=(n, k)->(n-k)*ithprime(1+k): seq(seq(a(n, k), k=0..n-1), n=1..11);
  • Mathematica
    Flatten[Table[(n-k)*Prime[1+k],{n,1,11},{k,0,n-1}]]
  • PARI
    T(n, k) = (n - k)*prime(1 + k);
    tabl(nn) = for(n=1, nn, for(k=0, n-1, print1(T(n, k), ", ")); print); \\ triangle output
    
  • Sage
    [[(n-k)*Primes().unrank(k) for k in (0..n-1)] for n in (1..11)] # triangle output

Formula

T(n, k) = A025581(n, k)*A000040(1 + k).

A362866 Numbers k with the property that the parts of the symmetric representation of sigma(k) are two octagons.

Original entry on oeis.org

10, 14, 22, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502, 514, 526
Offset: 1

Views

Author

Omar E. Pol, May 06 2023

Keywords

Comments

Note that odd primes (A065091) are also the numbers j with the property that the parts of the symmetric representation of sigma(j) are two rectangles or more generally two quadrilaterals.
Conjecture 1: The octagons are S-shaped and they have width 1.
Conjecture 2: This sequence is also the primes doubled (or even semiprimes) >= 10 (Cf. A100484). - Omar E. Pol, Aug 15 2023
For the symmetric representation of sigma(n) to consist of 2 octagons the first 3 entries in row n of the triangle of A249223 must be nonzero, hence must be 1's, indicating width 1, with the remaining entries zero. Therefore, row n of A237048 is 100100..., implying n = 2*p with p>3 prime. Both conjectures are true. - Hartmut F. W. Hoft, Aug 22 2023
From Omar E. Pol, Aug 23 2023: (Start)
Also the row numbers of the triangle A364639 where the rows are [1, 0, -1, 1] or where the rows start with [1, 0, -1, 1] and the remaining terms are zeros.
Each supersequence A063221 >= 10 and A091999 >= 10 gives the numbers k with the property that the first part of the symmetric representation of sigma(k) is an octagon. In that case each supersequence gives the row numbers of the triangle A364639 where the rows start with [1, 0, -1]. (End)

Examples

			The symmetric representation of sigma(14) in the first quadrant is as follows:
.   _ _ _ _ _ _ _ _
   |_ _ _ _ _ _ _  |
                 | |
                 | |_
                 |_ _|
                     |_ _
                       | |_ _ _
                       |_ _ _  |
                             | |
                             | |
                             | |
                             | |
                             | |
                             | |
                             |_|
.
The diagram has only two parts (or polygons) and both are octagons so 14 is in the sequence.
		

Crossrefs

Extensions

More terms from Omar E. Pol, Aug 15 2023

A009530 Expansion of e.g.f. sin(tanh(x)/cos(x)).

Original entry on oeis.org

1, 0, 12, -336, -2096, -1043328, -29488704, -8894706432, -389860902656, -170568226222080, -6327905330549760, -6080018829202427904, 242897035394043301888, -323994054628796940582912, 123697309877515731773669376, -13142696592417683099946516480
Offset: 0

Views

Author

Keywords

Comments

Among solutions to a(n)=2n are primes, twice primes (A001747) and also further numbers.

Programs

  • Mathematica
    Sin[ Tanh[ x ]/Cos[ x ] ] (* Odd Part *)
  • PARI
    x='x+O('x^34); v = Vec(serlaplace(sin(tanh(x)/cos(x)))); vector(#v\2, n, v[2*n-1]) \\ Michel Marcus, Apr 02 2017

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997

A062816 a(n) = phi(n)*tau(n) - 2n = A000010(n)*A000005(n) - 2*n.

Original entry on oeis.org

-1, -2, -2, -2, -2, -4, -2, 0, 0, -4, -2, 0, -2, -4, 2, 8, -2, 0, -2, 8, 6, -4, -2, 16, 10, -4, 18, 16, -2, 4, -2, 32, 14, -4, 26, 36, -2, -4, 18, 48, -2, 12, -2, 32, 54, -4, -2, 64, 28, 20, 26, 40, -2, 36, 50, 80, 30, -4, -2, 72, -2, -4, 90, 96, 62, 28, -2, 56, 38, 52, -2, 144, -2, -4, 90, 64, 86, 36, -2, 160, 108, -4, -2, 120, 86, -4
Offset: 1

Views

Author

Labos Elemer, Jul 20 2001

Keywords

Comments

It can be shown that phi(n)*tau(n) >= n, which means that quotient = n/tau(n) <= phi(n); note: a(n)+5 is positive.
The value is always positive except when a(n) = 0 for {8,9,12}; or a(n) = -2 for primes together with 4 (i.e., for A046022 but without 1); or a(n) = -4 for A001747 (without 2 and 4); or a(n) = -1 for n = 1.

Crossrefs

Programs

  • Mathematica
    Table[EulerPhi[n]DivisorSigma[0,n]-2n,{n,90}] (* Harvey P. Dale, Feb 03 2021 *)
  • PARI
    a(n)={eulerphi(n)*numdiv(n) - 2*n} \\ Harry J. Smith, Aug 11 2009

Formula

a(n) = A062355(n) - 2*n. - Amiram Eldar, Jul 10 2024

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Aug 11 2009
Previous Showing 21-30 of 39 results. Next