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 101-110 of 235 results. Next

A336336 Squared distance from start of a point moving in a square spiral.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 1, 2, 5, 4, 5, 8, 5, 4, 5, 8, 5, 4, 5, 8, 5, 4, 5, 8, 13, 10, 9, 10, 13, 18, 13, 10, 9, 10, 13, 18, 13, 10, 9, 10, 13, 18, 13, 10, 9, 10, 13, 18, 25, 20, 17, 16, 17, 20, 25, 32, 25, 20, 17, 16, 17, 20, 25, 32, 25, 20, 17, 16, 17, 20, 25, 32
Offset: 1

Views

Author

Hugo Pfoertner, Jul 18 2020

Keywords

Comments

The terms corresponding to the corner points of the spiral with a(k-1) < a(k) > a(k+1), i.e., 2, 2, 2, 5, 8, 8, 8, 13, 18, 18, 18, ... are given by the sequence A001105(1) repeated 3 times, (A001105(1)+A001105(2))/2, A001105(2) repeated 3 times, (A001105(2)+A001105(3))/2, A001105(3) repeated 3 times, ... .
These numbers are the norms of the Gaussian integers discussed in A345436. - N. J. A. Sloane, Jun 25 2021

Crossrefs

Programs

  • PARI
    A336336(m)={my(v=vectorsmall(m));for(Lstart=0,1,my(L=Lstart,d=1,n=0);for(r=1,oo,d=-d;my(k=floor(r/2)*d); for(j=1,L++,n++;if(n<=m,v[n]+=k*k));forstep(j=k-d,-floor((r+1)/2)*d+d,-d,n++;if(n<=m,v[n]+=j*j));if(n>m,break)));v};
    A336336(73)

Formula

a(n) = A174344(n)^2 + A268038(n)^2 = A174344(n)^2 + A274923(n)^2.

A336852 a(n) = sigma(A003961(n)) - sigma(n).

Original entry on oeis.org

0, 1, 2, 6, 2, 12, 4, 25, 18, 14, 2, 50, 4, 24, 24, 90, 2, 85, 4, 62, 40, 20, 6, 180, 26, 30, 116, 100, 2, 120, 6, 301, 36, 26, 48, 312, 4, 36, 52, 230, 2, 192, 4, 98, 170, 48, 6, 602, 76, 135, 48, 136, 6, 504, 40, 360, 64, 38, 2, 456, 6, 56, 268, 966, 60, 192, 4, 134, 84, 240, 2, 1045, 6, 54, 218, 172, 72, 264, 4, 782
Offset: 1

Views

Author

Antti Karttunen, Aug 05 2020

Keywords

Comments

Inverse Möbius transform of A336853(n) = (A003961(n) - n).

Crossrefs

Cf. A001105 (positions of odd terms), A001359 (positions of 2's).

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A336852(n) = (sigma(A003961(n)) - sigma(n));
    
  • PARI
    A336852(n) = sumdiv(n,d,A003961(d)-d);

Formula

a(n) = Sum_{d|n} (A003961(d)-d).
a(n) = A003973(n) - A000203(n) = A000203(A003961(n)) - A000203(n).
a(n) = A336851(n) + A286385(n).

A345960 Numbers whose prime indices have alternating sum 2.

Original entry on oeis.org

3, 12, 27, 30, 48, 70, 75, 108, 120, 147, 154, 192, 243, 270, 280, 286, 300, 363, 432, 442, 480, 507, 588, 616, 630, 646, 675, 750, 768, 867, 874, 972, 1080, 1083, 1120, 1144, 1200, 1323, 1334, 1386, 1452, 1470, 1587, 1728, 1750, 1768, 1798, 1875, 1920, 2028
Offset: 1

Views

Author

Gus Wiseman, Jul 12 2021

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.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime indices is also the reverse-alternating sum of reversed prime indices.
Also numbers with odd Omega (A001222) and exactly two odd conjugate prime indices. The version for even Omega is A345962, and the union is A345961. Conjugate prime indices are listed by A321650 and ranked by A122111.

Examples

			The initial terms and their prime indices:
    3: {2}
   12: {1,1,2}
   27: {2,2,2}
   30: {1,2,3}
   48: {1,1,1,1,2}
   70: {1,3,4}
   75: {2,3,3}
  108: {1,1,2,2,2}
  120: {1,1,1,2,3}
  147: {2,4,4}
  154: {1,4,5}
  192: {1,1,1,1,1,1,2}
  243: {2,2,2,2,2}
  270: {1,2,2,2,3}
  280: {1,1,1,3,4}
  286: {1,5,6}
  300: {1,1,2,3,3}
		

Crossrefs

These partitions are counted by A000097.
The k = 0 version is A000290, counted by A000041.
The k = 1 version is A001105 (reverse: A345958).
The k > 0 version is A026424.
These multisets are counted by A120452.
These are the positions of 2's in A316524 (reverse: A344616).
The k = -1 version is A345959.
The version for reversed alternating sum is A345961.
The k = -2 version is A345962.
A000984/A345909/A345911 count/rank compositions with alternating sum 1.
A002054/A345924/A345923 count/rank compositions with alternating sum -2.
A056239 adds up prime indices, row sums of A112798.
A088218/A345925/A345922 count/rank compositions with alternating sum 2.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 and A325535 count separable and inseparable partitions.
A344606 counts alternating permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[primeMS[#]]==2&]

A350845 Heinz numbers of integer partitions with at least two adjacent parts of quotient 2.

Original entry on oeis.org

6, 12, 18, 21, 24, 30, 36, 42, 48, 54, 60, 63, 65, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 130, 132, 133, 138, 144, 147, 150, 156, 162, 168, 174, 180, 186, 189, 192, 195, 198, 204, 210, 216, 222, 228, 231, 234, 240, 246, 252, 258, 260, 264, 266, 270
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are numbers with at least two adjacent prime indices of quotient 1/2.

Examples

			The terms and corresponding partitions begin:
   6: (2,1)
  12: (2,1,1)
  18: (2,2,1)
  21: (4,2)
  24: (2,1,1,1)
  30: (3,2,1)
  36: (2,2,1,1)
  42: (4,2,1)
  48: (2,1,1,1,1)
  54: (2,2,2,1)
  60: (3,2,1,1)
  63: (4,2,2)
  65: (6,3)
  66: (5,2,1)
  72: (2,2,1,1,1)
  78: (6,2,1)
  84: (4,2,1,1)
  90: (3,2,2,1)
  96: (2,1,1,1,1,1)
		

Crossrefs

The complement is A350838, counted by A350837.
The strict complement is counted by A350840.
These partitions are counted by A350846.
A000041 = integer partitions.
A000045 = sets containing n with all differences > 2.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A116931 = partitions with no successions, ranked by A319630.
A116932 = partitions with differences != 1 or 2, strict A025157.
A323092 = double-free integer partitions, ranked by A320340.
A325160 ranks strict partitions with no successions, counted by A003114.
A350839 = partitions with gaps and conjugate gaps, ranked by A350841.

Programs

  • Mathematica
    primeptn[n_]:=If[n==1,{},Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]];
    Select[Range[100],MemberQ[Divide@@@Partition[primeptn[#],2,1],2]&]

A042978 Stern primes: primes not of the form p + 2b^2 for p prime and b > 0.

Original entry on oeis.org

2, 3, 17, 137, 227, 977, 1187, 1493
Offset: 1

Views

Author

Keywords

Comments

No others < 1299709. Are there any others? Related to a conjecture of Goldbach.
The next element of the sequence, if it exists, is larger than 10^9 ; see A060003. - M. F. Hasler, Nov 16 2007
The next element, if it exists, is larger than 2*10^13. - Benjamin Chaffin, Mar 28 2008
Does not equal A000040(k) + A001105(j) for all k & j >0. - Robert G. Wilson v, Sep 07 2012

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 226.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 137, p. 46, Ellipses, Paris 2008.
  • L. E. Dickson, History of the theory of Numbers, vol. 1, page 424.

Crossrefs

Apart from the first term, a subsequence of A060003.

Programs

  • Maple
    N:= 10^6: # to check primes up to N
    P:= select(isprime, {2,seq(i,i=3..N,2)}):
    S:= {seq(2*b^2,b=1..floor(sqrt(N/2)))}:
    P minus {seq(seq(p+s,p=P),s=S)}; # Robert Israel, Jan 19 2016
  • Mathematica
    fQ[n_] := Block[{k = Floor[ Sqrt[ n/2]]}, While[k > 0 && !PrimeQ[n - 2*k^2], k--]; k == 0]; Select[ Prime[Range[238]], fQ] (* Robert G. Wilson v, Sep 07 2012 *)
  • PARI
    forprime( n=1,default(primelimit), for(s=1,sqrtint(n\2), if(isprime(n-2*s^2),next(2)));print(n)) \\ M. F. Hasler, Nov 16 2007
    
  • PARI
    forprime(p=2,4e9,forstep(k=sqrt(p\2),1,-1,if(isprime(p-2*k^2),next(2)));print1(p", ")) \\ Charles R Greathouse IV, Aug 04 2011

A046920 Number of ways to express n as p+2a^2; p = 1 or prime, a >= 0.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a046920 n = length $ filter ((\x -> x == 1 || a010051 x == 1) . (n -)) $
                                takeWhile (< n) a001105_list
    -- Reinhard Zumkeller, Apr 03 2013

A103254 Positive integers x such that there exist positive integers y and z satisfying x^3 + y^3 = z^2.

Original entry on oeis.org

1, 2, 4, 7, 8, 9, 10, 11, 14, 16, 18, 21, 22, 23, 25, 26, 28, 32, 33, 34, 35, 36, 37, 38, 40, 44, 46, 49, 50, 56, 57, 63, 64, 65, 70, 72, 78, 81, 84, 86, 88, 90, 91, 92, 95, 98, 99, 100, 104, 105, 110, 112, 114, 121, 122, 126, 128, 129, 130, 132, 136, 140, 144, 148, 152, 154, 158, 160, 162, 169, 170, 175, 176, 177, 183, 184, 189, 190, 193, 196, 198, 200
Offset: 1

Views

Author

Cino Hilliard, Mar 20 2005

Keywords

Comments

A001105 is a subset (excluding 0), since (x, y, z) = (A001105(k), A001105(k), A033430(k)) satisfies x^3 + y^3 = z^2. - R. J. Mathar, Sep 11 2006
A parametric solution: {x,y,z} = {g*(4*e + g)*(4*e^2 + 8*e*g + g^2), 2*g*(4*e + g)*(-2*e^2 +2*e*g + g^2), 3*g^2*(4*e + g)^2*(4*e^2 + 2*e*g + g^2)}, provided (-2*e^2 +2*e*g + g^2) > 0. - James Mc Laughlin, Jan 27 2007
Allowing y = 0 would give the same sequence, since x^3 = z^2 implies x is a square, and all squares are terms since (t^2)^3 + (2*t^2)^3 = (3*t^3)^2. On the other hand, allowing y to be negative would introduce new terms: 71, 74, and 155 would be terms since 71^3 + (-23)^3 = 588^2, 74^3 + (-47)^3 = 549^2, and 155^3 + (-31)^3 = 1922^2. See A356720. - Jianing Song, Aug 24 2022

Examples

			x=7, y=21, 7^3 + 21^3 = 98^2. 7 is the 4th term in the list.
Other solutions are (x, y, z)=(1, 2, 3), (4, 8, 24), (7, 21, 98), (9, 18, 81), (10, 65, 525), (11, 37, 228), (14, 70, 588), (16, 32, 192), (21, 7, 98), (22, 26, 168), (23, 1177, 40380), ...
		

Crossrefs

See A103255 for another version.

Programs

  • Magma
    [ k : k in [1..200] | exists{P : P in IntegralPoints(EllipticCurve([0,k^3])) | P[1] gt 0 and P[2] ne 0 } ]; // Geoff Bailey, Jan 28 2007

Extensions

Recomputed and extended to 48 terms by Geoff Bailey (geoff(AT)maths.usyd.edu.au) using Magma, Jan 28 2007
Terms 104..200 added by Joerg Arndt, Sep 29 2012

A144650 Triangle read by rows where T(m,n) = 2m*n + m + n + 1.

Original entry on oeis.org

5, 8, 13, 11, 18, 25, 14, 23, 32, 41, 17, 28, 39, 50, 61, 20, 33, 46, 59, 72, 85, 23, 38, 53, 68, 83, 98, 113, 26, 43, 60, 77, 94, 111, 128, 145, 29, 48, 67, 86, 105, 124, 143, 162, 181, 32, 53, 74, 95, 116, 137, 158, 179, 200, 221, 35, 58, 81, 104, 127, 150, 173, 196, 219, 242, 265
Offset: 1

Views

Author

Vincenzo Librandi, Jan 13 2009

Keywords

Comments

First column: A016789, second column: A016885, third column: A017029, fourth column: A017221, fifth column: A017461. - Vincenzo Librandi, Nov 21 2012

Examples

			Triangle begins:
   5;
   8, 13;
  11, 18, 25;
  14, 23, 32, 41;
  17, 28, 39, 50,  61;
  20, 33, 46, 59,  72,  85;
  23, 38, 53, 68,  83,  98, 113;
  26, 43, 60, 77,  94, 111, 128, 145;
  29, 48, 67, 86, 105, 124, 143, 162, 181;
  32, 53, 74, 95, 116, 137, 158, 179, 200, 221; etc.
		

Crossrefs

Columns k: A016789 (k=1), A016885 (k=2), A017029 (k=3), A017221 (k=4), A017461 (k=5).

Programs

  • Magma
    [2*n*k + n + k + 1: k in [1..n], n in [1..11]]; // Vincenzo Librandi, Nov 21 2012
    
  • Mathematica
    T[n_,k_]:= 2 n*k + n + k + 1; Table[T[n, k], {n, 11}, {k, n}]//Flatten (* Vincenzo Librandi, Nov 21 2012 *)
  • SageMath
    flatten([[2*n*k+n+k+1 for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Oct 14 2023

Formula

Sum_{n=1..m} T(m, n) = m*(2*m+3)*(m+1)/2 = A160378(n+1) (row sums). - R. J. Mathar, Jan 15 2009, Jan 05 2011
From G. C. Greubel, Oct 14 2023: (Start)
T(n, n) = A001844(n).
T(n, n-1) = A001105(n), n >= 2.
T(n, n-2) = A142463(n-1), n >= 3.
T(n, n-3) = (-1)*A147973(n+2), n >= 4.
Sum_{k=1..n} (-1)^k*T(n, k) = (-1)^n*A007742(floor((n+1)/2)).
G.f.: x*y*(5 - 2*x - 2*x*y - 2*x^2*y + x^2*y^2)/((1-x)^2*(1-x*y)^3). (End)

A166911 a(n) = (9 + 14*n + 12*n^2 + 4*n^3)/3.

Original entry on oeis.org

3, 13, 39, 89, 171, 293, 463, 689, 979, 1341, 1783, 2313, 2939, 3669, 4511, 5473, 6563, 7789, 9159, 10681, 12363, 14213, 16239, 18449, 20851, 23453, 26263, 29289, 32539, 36021, 39743, 43713, 47939, 52429, 57191, 62233, 67563, 73189, 79119, 85361, 91923
Offset: 0

Views

Author

Paul Curtz, Oct 23 2009

Keywords

Comments

The inverse binomial transform yields the quasi-finite sequence 3,10,16,8,0,.. (0 continued).
These are the bottom-left numbers in the blocks (each with 2 rows) shown in A172002, the
atomic number of the leftmost element in the 2nd, 4th, 6th etc. row of the Janet table.

References

  • Charles Janet, La structure du noyau de l'atome .., Nov 1927, page 15.

Programs

Formula

First differences: a(n)-a(n-1) = 2+4*n+4*n^2 = 1+(1+2n)^2 = 1 + A016754(n+1) = A069894(n+1).
Second differences: a(n) - 2*a(n-1) + a(n-2) = 8*n = A008590(n+2).
Third differences: a(n) - 3*a(n-1) + 3*a(n-2) - a(n-3) = 8.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: (3 + x + 5*x^2 - x^3)/(1-x)^4.
a(n) = A166464(n) + 2*(n+1)^2 = A166464(n) + A001105(n+1).
E.g.f.: (1/3)*(9 + 30*x + 24*x^2 + 4*x^3)*exp(x). - G. C. Greubel, May 28 2016

Extensions

Edited and extended by R. J. Mathar, Mar 02 2010

A195824 a(n) = 24*n^2.

Original entry on oeis.org

0, 24, 96, 216, 384, 600, 864, 1176, 1536, 1944, 2400, 2904, 3456, 4056, 4704, 5400, 6144, 6936, 7776, 8664, 9600, 10584, 11616, 12696, 13824, 15000, 16224, 17496, 18816, 20184, 21600, 23064, 24576, 26136, 27744, 29400, 31104, 32856, 34656, 36504, 38400, 40344
Offset: 0

Views

Author

Omar E. Pol, Sep 28 2011

Keywords

Comments

Sequence found by reading the line from 0, in the direction 0, 24, ..., in the square spiral whose vertices are the generalized tetradecagonal numbers A195818.
Surface area of a cube with side 2n. - Wesley Ivan Hurt, Aug 05 2014

Crossrefs

Programs

  • Magma
    [24*n^2 : n in [0..50]]; // Wesley Ivan Hurt, Aug 05 2014
    
  • Magma
    I:=[0,24,96]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]]; // Vincenzo Librandi, Aug 06 2014
  • Maple
    A195824:=n->24*n^2: seq(A195824(n), n=0..50); # Wesley Ivan Hurt, Aug 05 2014
  • Mathematica
    24 Range[0, 30]^2 (* or *) Table[24 n^2, {n, 0, 30}] (* or *) CoefficientList[Series[24 x (1 + x)/(1 - x)^3, {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 05 2014 *)
    LinearRecurrence[{3,-3,1},{0,24,96},40] (* Harvey P. Dale, Nov 11 2017 *)
  • PARI
    a(n) = 24*n^2; \\ Michel Marcus, Aug 05 2014
    

Formula

a(n) = 24*A000290(n) = 12*A001105(n) = 8*A033428(n) = 6*A016742(n) = 4*A033581(n) = 3*A139098(n) = 2*A135453(n).
From Wesley Ivan Hurt, Aug 05 2014: (Start)
G.f.: 24*x*(1+x)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Elmo R. Oliveira, Dec 01 2024: (Start)
E.g.f.: 24*x*(1 + x)*exp(x).
a(n) = n*A008606(n) = A195158(2*n). (End)
Previous Showing 101-110 of 235 results. Next