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 11-20 of 25 results. Next

A009188 Short leg of more than one Pythagorean triangle.

Original entry on oeis.org

9, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 54, 55, 56, 57, 60, 63, 64, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 81, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 111, 112, 114, 115, 116
Offset: 1

Views

Author

Keywords

Comments

Values of n for which composite n X n magic squares are possible. - J. Lowell, May 20 2010
If n is in the sequence, k*n is in the sequence for all k > 1. So odd semiprimes (A046315) and numbers of the form 4*p where p is an odd prime are core subsequences which give the initial terms of arithmetic progressions in this sequence. - Altug Alkan, Nov 29 2015
Numbers appearing more than once in A009004. - Sean A. Irvine, Apr 20 2018

Crossrefs

Programs

  • Maple
    filter:= proc(n) not isprime(n) and (n::odd or not isprime(n/2)) end proc:
    select(filter, [$9 .. 10000]); # Robert Israel, Nov 30 2015
  • Mathematica
    filterQ[n_] := !PrimeQ[n] && (OddQ[n] || !PrimeQ[n/2]);
    Select[Range[9, 120], filterQ] (* Jean-François Alcover, Feb 28 2019, from Maple *)
  • PARI
    forcomposite(n=9, 1e3, if(n % 2 == 1 || !isprime(n/2), print1(n, ", "))) \\ Altug Alkan, Dec 01 2015
    
  • Python
    from sympy import primepi
    def A009188(n):
        def f(x): return int(n+2+primepi(x)+primepi(x>>1))
        m, k = n+2, f(n+2)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Oct 17 2024

Formula

a(n) = A264828(n+2). - Chai Wah Wu, Oct 17 2024

A057859 Number of residue classes modulo n which contain a prime.

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 7, 5, 7, 6, 11, 6, 13, 8, 10, 9, 17, 8, 19, 10, 14, 12, 23, 10, 21, 14, 19, 14, 29, 11, 31, 17, 22, 18, 26, 14, 37, 20, 26, 18, 41, 15, 43, 22, 26, 24, 47, 18, 43, 22, 34, 26, 53, 20, 42, 26, 38, 30, 59, 19, 61, 32, 38, 33, 50, 23, 67, 34, 46
Offset: 1

Views

Author

Henry Bottomley, Sep 08 2000

Keywords

Comments

a(n) = n iff n is prime; a(2*n)<=n+1; a(4*p)=2*p for primes p>2: a(A001749(n))=A057860(A001749(n)). - Reinhard Zumkeller, Jan 11 2004

Examples

			a(30) = 11 since 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

Programs

  • Maple
    with(numtheory):
    a:= n-> phi(n)+nops(factorset(n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 14 2016
  • Mathematica
    Table[EulerPhi[n] + PrimeNu[n], {n, 1, 100}] (* G. C. Greubel, May 13 2017 *)
  • PARI
    for(n=1,100, print1(eulerphi(n) + omega(n), ", ")) \\ G. C. Greubel, May 13 2017

Formula

a(n) = A000010(n) + A001221(n) = n - A057860(n).

A075520 4*prime(n) + (prime(n) mod 4).

Original entry on oeis.org

10, 15, 21, 31, 47, 53, 69, 79, 95, 117, 127, 149, 165, 175, 191, 213, 239, 245, 271, 287, 293, 319, 335, 357, 389, 405, 415, 431, 437, 453, 511, 527, 549, 559, 597, 607, 629, 655, 671, 693, 719, 725, 767, 773, 789, 799, 847, 895, 911, 917, 933, 959, 965
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 19 2002

Keywords

Crossrefs

Programs

  • Haskell
    a075520 n = a075520_list !! (n-1)
    a075520_list = zipWith (+) a001749_list a039702_list
    -- Reinhard Zumkeller, Feb 20 2012
  • Mathematica
    4#+Mod[#,4]&/@Prime[Range[60]] (* Harvey P. Dale, Mar 10 2016 *)

Formula

a(n) = A001749(n) + A039702(n).

A177425 Integers with multiple and strictly distinct powers.

Original entry on oeis.org

12, 18, 20, 24, 28, 40, 44, 45, 48, 50, 52, 54, 56, 63, 68, 72, 75, 76, 80, 88, 92, 96, 98, 99, 104, 108, 112, 116, 117, 124, 135, 136, 144, 147, 148, 152, 153, 160, 162, 164, 171, 172, 175, 176, 184, 188, 189, 192, 200, 207, 208, 212, 224, 232, 236, 242, 244, 245
Offset: 1

Views

Author

Keywords

Comments

12=2^2*3, 18=2*3^2,.. 600=2^3*3*5^2,..

Crossrefs

Apart from its first term, A001749 is a subsequence.
Cf. A001358.

Programs

  • Mathematica
    f[n_]:=Sort[Last/@FactorInteger[n]];lst={};Do[If[Length[f[n]]>1&&f[n]==Union@f[n],AppendTo[lst,n]],{n,0,6!}];lst
  • PARI
    is(n)=my(f=vecsort(factor(n)[,2]~)); n>1 && Set(f)==f && #f>1 \\ Charles R Greathouse IV, Mar 20 2014

Formula

a(n) << n log n. - Charles R Greathouse IV, Mar 25 2014

A272470 7 times the primes.

Original entry on oeis.org

14, 21, 35, 49, 77, 91, 119, 133, 161, 203, 217, 259, 287, 301, 329, 371, 413, 427, 469, 497, 511, 553, 581, 623, 679, 707, 721, 749, 763, 791, 889, 917, 959, 973, 1043, 1057, 1099, 1141, 1169, 1211, 1253, 1267, 1337, 1351, 1379, 1393, 1477, 1561, 1589, 1603, 1631, 1673, 1687, 1757, 1799, 1841, 1883, 1897
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2016

Keywords

Crossrefs

Column 4 of A272214.
k times the primes (k=1..6): A000040, A100484, A001748, A001749, A001750, A138636.

Programs

  • Mathematica
    7 Prime@ Range@ 58 (* Michael De Vlieger, May 01 2016 *)
  • PARI
    a(n) = 7*prime(n); \\ Michel Marcus, May 01 2016
    
  • Python
    from sympy import prime
    for n in range(1,1000):print(7*prime(n),end=", ") # Soumil Mandal, May 08 2016

Formula

a(n) = 7*prime(n) = 7*A000040(n).

A326697 a(n) is the sum of divisors d of n such that sigma(d) divides n.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 12, 1, 1, 1, 5, 1, 8, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 3, 1, 40, 1, 1, 1, 17, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 28
Offset: 1

Views

Author

Jaroslav Krizek, Jul 19 2019

Keywords

Comments

a(A097603(n)) > 1.
See A173441 and A326698 for number and product of such divisors.
From Bernard Schott, Aug 13 2019: (Start)
a(n) = 1 if n is in A000961,
a(n) = 1 if n is in A006881 \ {6},
a(n) = 1 if n is in A001749 \ {12, 28}. (End)

Examples

			For n = 12, divisors d of 12: 1, 2, 3, 4, 6, 12;
corresponding sigma(d): 1, 3, 4, 7, 12, 28;
sigma(d) divides n for 4 divisors d: 1, 2, 3, 6;
a(12) = 1 + 2 + 3 + 6 = 12.
		

Crossrefs

Programs

  • Magma
    [&+[d: d in Divisors(n) | IsIntegral(n / SumOfDivisors(d))]: n in [1..100]];
    
  • Mathematica
    a[n_] := DivisorSum[n, # &, Divisible[n, DivisorSigma[1, #]] &]; Array[a, 100] (* Amiram Eldar, Jul 21 2019 *)
  • PARI
    a(n) = sumdiv(n, d, d*(!(n % sigma(d)))); \\ Michel Marcus, Jul 19 2019

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.

A181794 Numbers n such that the number of even divisors of n is an even divisor of n.

Original entry on oeis.org

4, 6, 10, 12, 14, 16, 20, 22, 24, 26, 28, 34, 36, 38, 44, 46, 48, 52, 58, 62, 68, 74, 76, 80, 82, 86, 90, 92, 94, 106, 112, 116, 118, 120, 122, 124, 126, 134, 142, 144, 146, 148, 150, 158, 160, 164, 166, 168, 172, 176, 178, 180, 188, 192, 194, 198, 202, 206, 208, 212, 214, 216, 218, 226, 234, 236, 240, 244, 252, 254, 256, 262, 264, 268, 272, 274, 278
Offset: 1

Views

Author

Matthew Vandermast, Nov 14 2010

Keywords

Comments

All terms are even, since odd numbers, even if they have an even count of divisors, don't have any even divisors.
Includes all numbers of the form A000040(m)*A001146(n).

Examples

			a(4)=12 has four even divisors (2, 4, 6, and 12), and 4 is one of those even divisors.
The number 21 is not in this sequence: it has four divisors (1, 3, 7, and 21), and 4 is not one of those divisors.
		

Crossrefs

A100484 and A001749 are subsequences. A001146 and A100042 are also subsequences except for their initial terms.
See also A033950, A049439, A181795.

Programs

  • Mathematica
    Select[Range[2, 1000, 2], EvenQ[DivisorSigma[0, #/2]] && MemberQ[Divisors[#], DivisorSigma[0, #/2]] &]
    Select[Range[2, 278, 2], EvenQ[(d = DivisorSigma[0, #/2])] && Divisible[#, d] &] (* Amiram Eldar, Aug 29 2019 *)

Extensions

Verified and edited by Alonso del Arte, Nov 17 2010

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).

A351958 a(1) = 1, followed by numbers k for which the primorial inflation of k is equal to x * p#, where p# is the primorial (A034386) of some prime p, and 1 <= x < p.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 26, 28, 29, 31, 33, 34, 37, 38, 39, 41, 43, 44, 46, 47, 51, 52, 53, 56, 57, 58, 59, 61, 62, 66, 67, 68, 69, 71, 73, 74, 76, 78, 79, 82, 83, 86, 87, 88, 89, 92, 93, 94, 97, 101, 102, 103, 104, 106, 107, 109, 111, 113, 114, 116, 118, 122, 123, 124
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2022

Keywords

Comments

Numbers k such that A108951(k) is in A060735.
Numbers k for which A324886(k) is a power of prime (in A000961).
Numbers k such that A108951(k) / A002110(A061395(k)) < A000040(1+A061395(k)), the next prime larger than the greatest prime dividing k.

Crossrefs

Positions of 1's in A329040.
Cf. A000961, A002110, A061395, A034386, A060735, A108951, A324886, A351956 (characteristic function).
Subsequences: A000040, A008578, A100484, A001748 \ {9}, A001749 \ {8}.
Cf. also A344591.

Programs

Previous Showing 11-20 of 25 results. Next