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 41-50 of 62 results. Next

A298604 Number of partitions of n into distinct odd prime parts (including 1).

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 6, 5, 5, 6, 6, 7, 7, 8, 9, 8, 9, 10, 11, 12, 11, 12, 14, 14, 15, 16, 17, 17, 17, 20, 22, 21, 22, 24, 25, 27, 28, 30, 31, 31, 33, 36, 39, 40, 40, 42, 46, 47, 49, 53, 54, 55, 58, 63, 67, 68, 70, 73, 77, 81, 84
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 22 2018

Keywords

Examples

			a(16) = 3 because we have [13, 3], [11, 5] and [7, 5, 3, 1].
		

Crossrefs

Programs

  • Mathematica
    nmax = 78; CoefficientList[Series[(1 + x) Product[(1 + x^Prime[k]), {k, 2, nmax}], {x, 0, nmax}], x]

Formula

G.f.: (1 + x)*Product_{k>=2} (1 + x^prime(k)).

A299766 Greatest odd noncomposite divisor of n.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 3, 5, 11, 3, 13, 7, 5, 1, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 5, 31, 1, 11, 17, 7, 3, 37, 19, 13, 5, 41, 7, 43, 11, 5, 23, 47, 3, 7, 5, 17, 13, 53, 3, 11, 7, 19, 29, 59, 5, 61, 31, 7, 1, 13, 11, 67, 17, 23, 7, 71, 3, 73, 37, 5, 19, 11, 13, 79, 5, 3, 41, 83, 7, 17, 43
Offset: 1

Views

Author

Omar E. Pol, Mar 12 2018

Keywords

Comments

The sequence can be constructed replacing the 2's with 1's in A006530.

Crossrefs

Cf. A000265 (odd part), A008578 (noncomposite numbers), A006005 (odd noncomposite numbers), A006530 (greatest noncomposite divisor).

Programs

  • Magma
    [#f eq 1 select 1 else f[#f][1] where f is Factorization(2*n): n in [1..90]]; // Vincenzo Librandi, Mar 20 2018
  • Maple
    A299766 := proc(n)
        local dvs ;
        dvs := sort(convert(numtheory[factorset](n) minus {2},list)) ;
        if nops(dvs) >= 1 then
            op(-1,dvs) ;
        else
            1;
        end if;
    end proc: # R. J. Mathar, May 05 2018
  • Mathematica
    Array[FactorInteger[#][[-1, 1]] /. 2 -> 1 &, 86] (* Michael De Vlieger, Mar 16 2018 *)
    Table[Max[Select[Divisors[n],OddQ[#]&&!CompositeQ[#]&]],{n,100}] (* Harvey P. Dale, May 17 2024 *)
  • PARI
    a(n) = my(m = n >> valuation(n, 2)); if (m==1, 1, vecmax(factor(m)[,1])); \\ Michel Marcus, Mar 15 2018
    

Formula

a(n) = A006530(A000265(n)). - Michel Marcus, Mar 15 2018
a(n) = 1 for n in A000079 (powers of 2). - Michel Marcus, Apr 14 2018

A300893 L.g.f.: log(Product_{k>=1} (1 + x^k)/(1 + x^prime(k))) = Sum_{n>=1} a(n)*x^n/n.

Original entry on oeis.org

1, -1, 1, 3, 1, 5, 1, 3, 10, 9, 1, 9, 1, 13, 16, 3, 1, 14, 1, 13, 22, 21, 1, 9, 26, 25, 37, 17, 1, 30, 1, 3, 34, 33, 36, 18, 1, 37, 40, 13, 1, 40, 1, 25, 70, 45, 1, 9, 50, 34, 52, 29, 1, 41, 56, 17, 58, 57, 1, 34, 1, 61, 94, 3, 66, 60, 1, 37, 70, 58, 1, 18, 1, 73, 116, 41, 78, 70, 1, 13, 118, 81, 1, 44, 86
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 14 2018

Keywords

Examples

			L.g.f.: L(x) = x - x^2/2 + x^3/3 + 3*x^4/4 + x^5/5 + 5*x^6/6 + x^7/7 + 3*x^8/8 + 10*x^9/9 + 9*x^10/10 + ...
exp(L(x)) = 1 + x + x^4 + x^5 + x^6 + x^7 + x^8 + 2*x^9 + 3*x^10 + ... + A096258(n)*x^n + ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 85; Rest[CoefficientList[Series[Log[Product[(1 + x^k)/(1 + x^Prime[k]), {k, 1, nmax}]], {x, 0, nmax}], x] Range[0, nmax]]
    nmax = 85; Rest[CoefficientList[Series[Sum[Boole[!PrimeQ[k]] k x^k/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
    Table[DivisorSum[n, (-1)^(n/# + 1) # &, !PrimeQ[#] &], {n, 85}]

Formula

G.f.: Sum_{k>=1} A018252(k)*x^A018252(k)/(1 + x^A018252(k)).
a(n) = 1 if n is an odd prime or 1 (A006005).

A328456 LCM of the prime indices of 2n + 1, all minus 1; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 1, 4, 5, 2, 6, 7, 3, 8, 2, 1, 9, 10, 4, 6, 11, 5, 12, 13, 2, 14, 3, 6, 15, 4, 7, 16, 17, 3, 10, 18, 8, 19, 20, 2, 12, 21, 1, 22, 6, 9, 23, 15, 10, 14, 24, 4, 25, 26, 6, 27, 28, 11, 29, 8, 5, 6, 4, 12, 2, 30, 13, 31, 21, 2, 32, 33, 14, 20, 18, 3, 34
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 2 * 17 + 1 = 35, all minus 1, are {2,3}, with LCM 6, so a(17) = 6.
		

Crossrefs

Positions of records (first appearances) are A006005.
The GCD of the prime indices of n, all minus 1, is A328167(n).
The LCM of the prime indices of n, all plus 1, is A328219(n).
Partitions whose parts minus 1 are relatively prime are A328170.
Numbers whose prime indices minus 1 are relatively prime are A328168.

Programs

  • Mathematica
    Table[If[n==1,0,LCM@@(PrimePi/@First/@FactorInteger[n]-1)],{n,1,100,2}]

A353160 Product_{n>=1} (1 + x^n)^a(n) = 1 + Sum_{n>=1} prime(n+1) * x^n.

Original entry on oeis.org

3, 2, 0, 4, -4, 6, -8, 11, 0, -18, 40, -67, 88, -78, -4, 205, -524, 926, -1234, 1060, 140, -2998, 7900, -14132, 18858, -16280, -2710, 48783, -127826, 228784, -306494, 263582, 55144, -829538, 2160120, -3864533, 5172792, -4406277, -1118324, 14531101, -37606792
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 28 2022

Keywords

Comments

Inverse weigh transform of odd primes.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(a(i), j)*b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= proc(n) option remember; ithprime(n+1)-b(n, n-1) end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Apr 28 2022
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[a[i], j] b[n - i j, i - 1], {j, 0, n/i}]]]; a[n_] := a[n] = Prime[n + 1] - b[n, n - 1]; Table[a[n], {n, 1, 41}]

A073738 Sum of every other prime <= n-th prime down to 2 or 1; equals the partial sums of A036467 (in which sums of two consecutive terms form the primes).

Original entry on oeis.org

1, 2, 4, 7, 11, 18, 24, 35, 43, 58, 72, 89, 109, 130, 152, 177, 205, 236, 266, 303, 337, 376, 416, 459, 505, 556, 606, 659, 713, 768, 826, 895, 957, 1032, 1096, 1181, 1247, 1338, 1410, 1505, 1583, 1684, 1764, 1875, 1957, 2072, 2156, 2283, 2379, 2510, 2608
Offset: 0

Views

Author

Paul D. Hanna, Aug 07 2002

Keywords

Examples

			a(10) = p_10 + p_8 + p_6 + p_4 + p_2 + p_0 = 29 + 19 + 13 + 7 + 3 + 1 = 72.
		

Crossrefs

Programs

  • Haskell
    a073738 n = a073738_list !! n
    a073738_list = tail zs where
       zs = 1 : 1 : zipWith (+) a006005_list zs
    -- Reinhard Zumkeller, Apr 28 2013
  • Maple
    a:= proc(n) a(n):= `if`(n<1, n+1, ithprime(n) + a(n-2)) end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 04 2021
  • Mathematica
    nn=60;Join[{1},Sort[Join[Accumulate[Prime[Range[1,nn+1,2]]], 1+#&/@ Accumulate[Prime[Range[2,nn,2]]]]]] (* Harvey P. Dale, May 04 2011 *)

Formula

a(n) = Sum_{m<=n, m=n (mod 2)} p_m, where p_m is the m-th prime; that is, a(2n+k) = p_(2n+k) + p_(2(n-1)+k) + p_(2(n-2)+k) +... +p_k, for 0<=k<2, where a(0)=1 and the 0th prime is taken to be 1.
a(n) = prime(n) + a(n-2) for n >= 2. - Alois P. Heinz, Jun 04 2021

A126793 a(1) = 1; a(n+1) = Sum_{k|n} floor(a(k)/a(n/k)).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 5, 7, 8, 11, 11, 16, 16, 21, 22, 28, 28, 36, 36, 45, 47, 58, 58, 72, 73, 89, 92, 110, 110, 137, 137, 161, 166, 194, 195, 232, 232, 268, 276, 317, 317, 371, 371, 423, 435, 493, 493, 568, 569, 643, 657, 738, 738, 843, 846, 948, 966, 1076, 1076, 1219, 1219
Offset: 1

Views

Author

Leroy Quet, Feb 20 2007

Keywords

Comments

a(n+1) = a(n) if and only if n is 1 or an odd prime (A006005). - Robert Israel, Dec 22 2016

Examples

			a(13) = sum{k|12} [a(k)/a(12/k)] = [a(1)/a(12)] + [a(2)/a(6)] + [a(3)/a(4)] + [a(4)/a(3)] + [a(6)/a(2)] + [a(12)/a(1)] = [1/11] + [1/3] + [2/2] + [2/2] + [3/1] + [11/1] = 0 +0 +1 +1 +3 +11 = 16.
		

Crossrefs

Cf. A006005.

Programs

  • Maple
    A[1]:= 1:
    for n from 1 to 100 do
      A[n+1] := add(floor(A[k]/A[n/k]),k=numtheory:-divisors(n))
    od:
    seq(A[i],i=1..100); # Robert Israel, Dec 22 2016
  • Mathematica
    f[l_List] := Block[{n = Length[l], d = Divisors[n]},Append[l, Sum[ Floor[l[[d[[k]]]]/l[[n/d[[k]]]]], {k, Length[d]}]]];Nest[f, {1}, 61] (* Ray Chandler, Mar 03 2007 *)
    a[1] = 1; a[n_] := a[n] = Sum[Floor[a[k]/a[(n - 1)/k]], {k, Divisors[n - 1]}]; Array[a, 62] (* Michael De Vlieger, Dec 22 2016 *)

Extensions

Extended by Ray Chandler, Mar 03 2007

A129768 Number of odd nonprime numbers less than the n-th prime.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 4, 6, 6, 8, 9, 9, 10, 12, 14, 14, 16, 17, 17, 19, 20, 22, 25, 26, 26, 27, 27, 28, 34, 35, 37, 37, 41, 41, 43, 45, 46, 48, 50, 50, 54, 54, 55, 55, 60, 65, 66, 66, 67, 69, 69, 73, 75, 77, 79, 79, 81, 82, 82, 86, 92, 93, 93, 94, 100, 102, 106, 106, 107, 109
Offset: 1

Views

Author

Giovanni Teofilatto, May 16 2007

Keywords

Comments

Also, a(n)=sum_{k=n-th even number..n-th odd prime together with 1}-k*(-1)^k. - Juri-Stepan Gerasimov, Jul 30 2009

Programs

Formula

a(n)=A008507(n-1)+1. - R. J. Mathar, Jul 06 2009
a(n)=sum_{k=A005843(n)..A006005(n)}-k*(-1)^k. - Juri-Stepan Gerasimov, Jul 30 2009

Extensions

Edited, corrected and extended by Robert G. Wilson v and R. J. Mathar, May 16 2007

A130891 a(n) = n if n is not an odd prime number. Otherwise, a(n) = k*floor(n/10), where k is the smallest integer such that n < 10^k.

Original entry on oeis.org

0, 1, 2, 0, 4, 0, 6, 0, 8, 9, 10, 2, 12, 2, 14, 15, 16, 2, 18, 2, 20, 21, 22, 4, 24, 25, 26, 27, 28, 4, 30, 6, 32, 33, 34, 35, 36, 6, 38, 39, 40, 8, 42, 8, 44, 45, 46, 8, 48, 49, 50, 51, 52, 10, 54, 55, 56, 57, 58, 10, 60, 12, 62, 63, 64, 65, 66, 12, 68
Offset: 0

Views

Author

Mohammad K. Azarian, Aug 21 2007

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      if n::odd and isprime(n) then
        k:= ilog10(n)+1;
        k*floor(n/10)
      else n
      fi
    end proc:
    map(f, [$0..100]); # Robert Israel, Aug 04 2019
  • Mathematica
    Table[If[n>2&&PrimeQ[n],IntegerLength[n]Floor[n/10],n],{n,0,70}] (* Harvey P. Dale, Mar 31 2025 *)

Extensions

Offset changed by Mohammad K. Azarian, Nov 19 2008
Offset corrected by Robert Israel, Aug 04 2019

A160656 The odd prime numbers together with 0: p - (-1)^p - 1 where p = n-th prime.

Original entry on oeis.org

0, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 23 2009

Keywords

Crossrefs

Programs

Formula

a(n) = p - (-1)^p - 1 where p is the n-th prime.
a(n) = p mod n^2, where p is the n-th prime. - Gary Detlefs, Jan 14 2012
Previous Showing 41-50 of 62 results. Next