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 411 results. Next

A387339 a(n) = Sum_{k=0..n} 3^k * binomial(n+2,k) * binomial(n+2,k+2).

Original entry on oeis.org

1, 12, 108, 880, 6855, 52164, 391720, 2918304, 21634290, 159880600, 1179180552, 8685874080, 63930198787, 470327654580, 3459353475600, 25442360389696, 187126561024686, 1376455855989672, 10126540146288520, 74515694338112160, 548444877468906726
Offset: 0

Views

Author

Seiichi Manyama, Aug 27 2025

Keywords

Crossrefs

Programs

  • Magma
    [&+[3^k * Binomial(n+2,k) * Binomial(n+2,k+2): k in [0..n]]: n in [0..25]]; // Vincenzo Librandi, Aug 29 2025
  • Mathematica
    Table[Sum[3^k * Binomial[n+2,k]*Binomial[n+2, k+2],{k,0,n}],{n,0,25}] (* Vincenzo Librandi, Aug 29 2025 *)
  • PARI
    a(n) = sum(k=0, n, 3^k*binomial(n+2, k)*binomial(n+2, k+2));
    

Formula

n*(n+4)*a(n) = (n+2) * (4*(2*n+3)*a(n-1) - 4*(n+1)*a(n-2)) for n > 1.
a(n) = Sum_{k=0..floor(n/2)} 3^k * 4^(n-2*k) * binomial(n+2,n-2*k) * binomial(2*k+2,k).
a(n) = [x^n] (1+4*x+3*x^2)^(n+2).
E.g.f.: exp(4*x) * BesselI(2, 2*sqrt(3)*x) / 3, with offset 2.

A387411 Numbers k such that the odd part of (1+k) divides (1+A003961(k)), where A003961 is fully multiplicative with a(p) = nextprime(p).

Original entry on oeis.org

1, 3, 4, 7, 10, 15, 18, 23, 27, 31, 47, 57, 63, 95, 119, 127, 255, 348, 383, 415, 447, 511, 575, 695, 767, 959, 1023, 1054, 1071, 1535, 1919, 2047, 2626, 3471, 3839, 4095, 4415, 6815, 8191, 8703, 13823, 16383, 31743, 32767, 39895, 42367, 48127, 64607, 65535, 68727, 74495, 81919, 92159, 98303, 113535, 124671, 131071
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2025

Keywords

Comments

Like in many sequences of this type, the criterion seems to select for numbers with a long tail of trailing 1-bits. Terms that are not in A004767 are: 1, 4, 10, 18, 57, 348, 1054, 2626, 675348, 1869741, 12371554, 14070141, 1158654378, 1673018314, etc.

Crossrefs

Subsequences: A000225, A348514 (which is also a subsequence of A387414).
For similar sequences, see A336700, A387410, A387415, A387410, A387418, A387419.

Programs

  • Mathematica
    a3961[x_] := Apply[Times, Prime[PrimePi[#1] + 1]^#2 & @@@ FactorInteger[x]] - Boole[x == 1];
    a265[x_] := x/2^IntegerExponent[x, 2];
    Select[Range[2^17], Divisible[1 + a3961[#], a265[# + 1] ] &] (* Michael De Vlieger, Sep 01 2025 *)
  • PARI
    A000265(n) = (n>>valuation(n,2));
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    isA387411(n) = !((1+A003961(n))%A000265(1+n));

A387413 The length of binary expansion of n minus the length of the maximal common prefix of the binary expansions of n and A003961(n), where A003961 is fully multiplicative with a(p) = nextprime(p).

Original entry on oeis.org

0, 1, 1, 0, 2, 1, 2, 3, 3, 0, 3, 3, 3, 3, 3, 3, 2, 0, 3, 4, 4, 3, 4, 4, 1, 2, 3, 3, 2, 3, 4, 5, 1, 5, 3, 5, 4, 3, 4, 3, 2, 2, 3, 5, 3, 3, 5, 2, 4, 5, 5, 5, 4, 5, 5, 5, 0, 5, 3, 5, 5, 4, 5, 5, 6, 6, 3, 5, 4, 6, 4, 5, 3, 6, 6, 6, 4, 6, 5, 5, 5, 5, 4, 6, 5, 5, 5, 4, 6, 5, 3, 5, 1, 5, 4, 6, 3, 6, 6, 4, 2, 6, 4, 5, 4
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2025

Keywords

Crossrefs

Cf. A000523, A003961, A387412, A387414 (positions of 0's).
Cf. also A387423.

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A387413(n) = { my(a=binary(n), b=binary(A003961(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };

Formula

a(n) = (1+A000523(n)) - A387412(n).

A387482 a(n) = Sum_{k=0..floor(n/3)} 3^k * 2^(n-3*k) * binomial(k,n-3*k)^2.

Original entry on oeis.org

1, 0, 0, 3, 6, 0, 9, 72, 36, 27, 486, 972, 297, 2592, 11664, 10611, 13446, 97200, 195129, 149688, 663876, 2334987, 2838726, 4697676, 21485817, 43705008, 51438240, 171480483, 517850982, 760446144, 1440329769, 5065354440, 10479570372, 15691149819, 44973017478
Offset: 0

Views

Author

Seiichi Manyama, Aug 30 2025

Keywords

Crossrefs

Programs

  • Magma
    [(&+[3^k * 2^(n-3*k) * Binomial(k,n-3*k)^2: k in [0..Floor(n/3)]]): n in [0..40]]; // Vincenzo Librandi, Aug 31 2025
  • Mathematica
    Table[Sum[3^k* 2^(n-3*k)*Binomial[k,n-3*k]^2,{k,0,Floor[n/3]}],{n,0,40}] (* Vincenzo Librandi, Aug 31 2025 *)
  • PARI
    a(n) = sum(k=0, n\3, 3^k*2^(n-3*k)*binomial(k, n-3*k)^2);
    

Formula

G.f.: 1/sqrt((1-3*x^3-6*x^4)^2 - 72*x^7).

A387483 a(n) = Sum_{k=0..floor(n/2)} 2^(n-k) * binomial(k,n-2*k)^2.

Original entry on oeis.org

1, 0, 2, 4, 4, 32, 24, 144, 304, 576, 2336, 3648, 13120, 30208, 70528, 218368, 456448, 1360896, 3316224, 8311808, 23127040, 54812672, 151197696, 380669952, 978595840, 2613067776, 6540566528, 17464705024, 44764708864, 116183662592, 305637064704, 783627386880
Offset: 0

Views

Author

Seiichi Manyama, Aug 30 2025

Keywords

Crossrefs

Cf. A298567.

Programs

  • Magma
    [(&+[2^(n-k)* Binomial(k,n-2*k)^2: k in [0..Floor(n/2)]]): n in [0..40]]; // Vincenzo Librandi, Sep 01 2025
  • Mathematica
    Table[Sum[2^(n-k)*Binomial[k,n-2*k]^2,{k,0,Floor[n/2]}],{n,0,40}] (* Vincenzo Librandi, Sep 01 2025 *)
  • PARI
    a(n) = sum(k=0, n\2, 2^(n-k)*binomial(k, n-2*k)^2);
    

Formula

G.f.: 1/sqrt((1-2*x^2-4*x^3)^2 - 32*x^5).

A385494 Total number of 1's in the decimal digits of the divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 3, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 1, 1, 3, 1, 2, 3, 2, 1, 2, 3, 2, 2, 1, 1, 4, 2, 2, 2, 2, 2, 3, 1, 2, 1, 3, 2, 3, 1, 1, 2, 2, 3, 2, 1, 3, 2, 2, 1, 4, 2, 1, 1, 3, 1, 4, 3, 1, 2, 1, 2, 3, 1, 2, 3, 3
Offset: 1

Views

Author

Robert Israel, Aug 27 2025

Keywords

Examples

			a(11) = 3 because of the divisors of 11, there is one 1 in 1 and two in 11.
a(60) = 4 because of the divisors of 60, there is one 1 in 1, one in 10, one in 12, one in 15 and none in the other divisors.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; add(numboccur(1, convert(d,base,10)),d=numtheory:-divisors(n)) end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_]:=Count[IntegerDigits[Divisors[n]]//Flatten,1]; Array[a,100] (* Stefano Spezia, Aug 28 2025 *)
  • PARI
    a(n) = sumdiv(n, d, #select(x->(x==1), digits(d))); \\ Michel Marcus, Aug 28 2025
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 27 2025
    

A386308 Long legs of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2) ordered by increasing hypotenuse (A386307), where u and v are positive integers.

Original entry on oeis.org

12, 20, 24, 28, 36, 40, 45, 44, 48, 52, 60, 56, 60, 72, 72, 68, 75, 63, 84, 76, 80, 90, 84, 88, 105, 92, 105, 96, 120, 120, 104, 120, 108, 112, 132, 105, 116, 120, 144, 124, 144, 135, 132, 156, 136, 150, 126, 140, 168, 168, 180, 148, 175, 165, 152, 156, 168, 180
Offset: 1

Views

Author

Felix Huber, Aug 19 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The Pythagorean triple (9, 12, 15) does not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), because 15 is not a sum of two nonzero squares. Therefore 12 is a term.
		

Crossrefs

Subsequence of A046084.

Programs

  • Maple
    A386308:=proc(N) # To get all terms with hypotenuses <= N
        local i,l,m,u,v,r,x,y,z;
        l:={};
        m:={};
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                x:=min(2*u*v,u^2-v^2);
                y:=max(2*u*v,u^2-v^2);
                z:=u^2+v^2;
                m:=m union {[z,y,x]};
                if gcd(u,v)=1 and is(u-v,odd) then
                    l:=l union {seq([i*z,i*y,i*x],i=1..N/z)}
                fi
            od
        od;
        r:=l minus m;
        return seq(r[i,2],i=1..nops(r));
    end proc;
    A386308(1000);

Formula

a(n) = sqrt(A386307(n)^2 - A386309(n)^2).
{A046084(n)} = {a(n)} union {A046087(n)} union {A386944(n)}.

A386309 Short legs of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2) ordered by increasing hypotenuse (A386307), where u and v are positive integers.

Original entry on oeis.org

9, 15, 18, 21, 15, 30, 24, 33, 36, 39, 25, 42, 45, 21, 30, 51, 40, 60, 35, 57, 60, 48, 63, 66, 36, 69, 56, 72, 27, 35, 78, 50, 81, 84, 55, 100, 87, 90, 42, 93, 60, 84, 99, 65, 102, 80, 120, 105, 49, 70, 33, 111, 60, 88, 114, 117, 99, 75, 48, 120, 140, 96, 123, 45
Offset: 1

Views

Author

Felix Huber, Aug 19 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The Pythagorean triple (9, 12, 15) does not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), because 15 is not a sum of two nonzero squares. Therefore 12 is a term.
		

Crossrefs

Subsequence of A046083.

Programs

  • Maple
    A386309:=proc(N) # To get all terms with hypotenuses <= N
        local i,l,m,u,v,r,x,y,z;
        l:={};
        m:={};
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                x:=min(2*u*v,u^2-v^2);
                y:=max(2*u*v,u^2-v^2);
                z:=u^2+v^2;
                m:=m union {[z,y,x]};
                if gcd(u,v)=1 and is(u-v,odd) then
                    l:=l union {seq([i*z,i*y,i*x],i=1..N/z)}
                fi
            od
        od;
        r:=l minus m;
        return seq(r[i,3],i=1..nops(r));
    end proc;
    A386309(1000);

Formula

a(n) = sqrt(A386307(n)^2 - A386308(n)^2).
{A046083(n)} = {a(n)} union {A046086(n)} union {A386945(n)}.

A387113 Numbers whose prime indices do not have (strictly) choosable initial intervals.

Original entry on oeis.org

4, 8, 12, 16, 18, 20, 24, 27, 28, 32, 36, 40, 44, 48, 52, 54, 56, 60, 64, 68, 72, 76, 80, 81, 84, 88, 90, 92, 96, 100, 104, 108, 112, 116, 120, 124, 126, 128, 132, 135, 136, 140, 144, 148, 150, 152, 156, 160, 162, 164, 168, 172, 176, 180, 184, 188, 189, 192
Offset: 1

Views

Author

Gus Wiseman, Aug 24 2025

Keywords

Comments

The initial interval of a nonnegative integer x is the set {1,...,x}.
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.
We say that a set or sequence of nonempty sets is choosable iff it is possible to choose a different element from each set. For example, ({1,2},{1},{1,3}) is choosable because we have the choice (2,1,3), but ({1,2,3},{1},{1,3},{2}) is not.
This sequence lists all numbers k such that if the prime indices of k are (x1,x2,...,xz), then the sequence of sets (initial intervals) ({1,...,x1},{1,...,x2},...,{1,...,xz}) is not choosable.

Examples

			The prime indices of 18 are {1,2,2}, with initial intervals ({1},{1,2},{1,2}), which have choices (1,1,1), (1,1,2), (1,2,1), (1,2,2), and since none of these are strict, 18 is in the sequence.
The prime indices of 85 are {3,7}, with initial intervals {{1,2,3},{1,2,3,4,5,6,7}}, which are choosable, so 85 is in not the sequence.
The prime indices of 90 are {1,2,2,3}, with initial intervals {{1},{1,2},{1,2},{1,2,3}}, which are not choosable, so 90 is in the sequence.
The terms together with their prime indices begin:
    4: {1,1}
    8: {1,1,1}
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
   27: {2,2,2}
   28: {1,1,4}
   32: {1,1,1,1,1}
   36: {1,1,2,2}
   40: {1,1,1,3}
   44: {1,1,5}
   48: {1,1,1,1,2}
   52: {1,1,6}
   54: {1,2,2,2}
   56: {1,1,1,4}
   60: {1,1,2,3}
   64: {1,1,1,1,1,1}
		

Crossrefs

For partitions instead of initial intervals we have A276079, complement A276078.
For prime factors instead of initial intervals we have A355529, complement A368100.
For divisors instead of initial intervals we have A355740, complement A368110.
These are the positions of 0 in A387111, complement A387134.
The complement is A387112.
Partitions of this type are counted by A387118, complement A238873.
For strict partitions instead of initial intervals we have A387137, complement A387176.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, row sums A056239 or A066328, lengths A001222.
A120383 lists numbers divisible by all of their prime indices.
A367902 counts choosable set-systems, complement A367903.
A370582 counts sets with choosable prime factors, complement A370583.
A370585 counts maximal subsets with choosable prime factors.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Select[Tuples[Range/@prix[#]],UnsameQ@@#&]=={}&]

A387136 Number of ways to choose a sequence of distinct prime factors, one of each prime index of 2n - 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 30 2025

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 4537 are {6,70}, with choices (2,5), (2,7), (3,2), (3,5), (3,7). Since 4537 = 2 * 2269 - 1, we have a(2269) = 5.
		

Crossrefs

Here we use the version with alternating zeros (put n instead of 2n - 1 in the name).
Twice partitions of this type are counted by A296122.
Positions of zero are A355529, complement A368100.
For divisors instead of prime factors we have A355739.
Allowing repeated choices gives A355741.
For partitions instead of prime factors we have A387110.
For initial intervals instead of prime factors we have A387111.
For strict partitions instead of prime factors we have A387115, disjoint case A383706.
For constant partitions instead of prime factors we have A387120.
A000041 counts integer partitions, strict A000009.
A003963 multiplies together prime indices.
A112798 lists prime indices, row sums A056239 or A066328, lengths A001222.
A120383 lists numbers divisible by all of their prime indices.
A289509 lists numbers with relatively prime prime indices.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Tuples[If[#==1,{},First/@FactorInteger[#]]&/@prix[2n-1]],UnsameQ@@#&]],{n,100}]
Previous Showing 21-30 of 411 results. Next