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.

Showing 1-10 of 13 results. Next

A277704 Positions of squares in A277699.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 24, 28, 30, 31, 32, 48, 56, 60, 62, 63, 64, 83, 96, 112, 120, 124, 126, 127, 128, 166, 192, 224, 240, 248, 252, 254, 255, 256, 332, 365, 384, 448, 480, 496, 504, 508, 510, 511, 512, 664, 730, 768, 896, 960, 992, 1008, 1016, 1020, 1022, 1023, 1024, 1328, 1460, 1536, 1792, 1920, 1984, 2016
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Crossrefs

Complement: A277706.
Cf. A023758 (a subsequence), A277807 (terms not in A023758).
Differs from A023758(1+n) and A077436(1+n) for the first time at n=23, for which a(23)=83, while A023758(24)=96 and A077436(24)=79.

A278239 a(n) = A278233(A277699(n)).

Original entry on oeis.org

1, 4, 6, 16, 12, 60, 6, 64, 30, 180, 6, 240, 12, 60, 24, 256, 240, 420, 6, 720, 12, 60, 30, 960, 6, 180, 60, 240, 30, 360, 30, 1024, 30, 5040, 30, 1680, 6, 60, 360, 2880, 30, 180, 210, 240, 120, 420, 6, 3840, 60, 60, 96, 720, 210, 1260, 6, 960, 60, 420, 30, 2160, 12, 420, 60, 4096, 180, 420, 30, 45360, 60, 420, 30, 6720, 30, 60, 840, 240, 30, 12600, 30, 11520, 12
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2016

Keywords

Comments

Prime factorization sentinel computed for A277699. Factorization is essentially done in the polynomial ring GF(2)[X].

Crossrefs

Programs

Formula

a(n) = A278233(A277699(n)).

A277706 Positions of nonsquares in A277699.

Original entry on oeis.org

5, 9, 10, 11, 13, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 61, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103, 104, 105
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Crossrefs

Complement: A277704.
Cf. A277805 (gives the corresponding values).
Subsequence of A101082 from which this differs for the first time at n=61, where a(61) = 84, while A101082(61) = 83, a term which is missing from this sequence.

A286376 a(n) = A278222(A277699(n)).

Original entry on oeis.org

2, 2, 6, 2, 24, 6, 12, 2, 60, 24, 180, 6, 120, 12, 24, 2, 60, 60, 420, 24, 180, 180, 60, 6, 192, 120, 384, 12, 240, 24, 48, 2, 60, 60, 420, 60, 720, 420, 360, 24, 420, 180, 1260, 180, 4620, 60, 420, 6, 720, 192, 5040, 120, 5040, 384, 1680, 12, 1440, 240, 4320, 24, 480, 48, 96, 2, 60, 60, 420, 60, 2520, 420, 1260, 60, 420, 720, 1260, 420, 1260, 360, 180, 24
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A278222(A277699(n)).

A277805 Nonsquares in A277699 listed in the order of their appearance.

Original entry on oeis.org

57, 209, 228, 217, 233, 801, 836, 809, 912, 793, 868, 785, 1009, 932, 1017, 969, 3137, 3204, 3145, 3344, 3193, 3236, 3185, 3648, 3217, 3172, 3225, 3472, 3241, 3140, 3233, 3937, 4036, 3945, 3728, 3929, 4068, 3921, 4017, 3876, 4025, 3977, 12417, 12548, 12425, 12816, 12473, 12580, 12465, 13376, 12369, 12772, 12377, 12944, 12393, 12740, 12385
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A277699(A277706(n)).

A277806 a(n) = A000196(A277699(A277807(n))).

Original entry on oeis.org

115, 230, 460, 461, 920, 922, 1840, 1844, 3680, 3688, 7360, 7376, 14720, 14752, 29440, 29504, 56757, 58880, 59008, 113514, 117760, 118016, 130057, 227028, 235520, 236032, 260114, 454056, 454933, 471040, 472064, 472533, 520228, 908112, 909866, 942080, 944128, 945066, 1040456, 1816224, 1819732, 1884160, 1888256, 1890132, 2034537
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Comments

A277807 lists the "sporadic" solutions to A048720(n, A065621(n)) = k^2, i.e., those solutions where n is not in A023758 (not yet proved: these are precisely those solutions where k <> n). This sequence gives the corresponding values of k.
If n is included in this sequence, then also 2n is included (and vice versa), thus the sequence is infinite and wholly determined by its odd terms.

Crossrefs

Programs

Formula

a(n) = A000196(A277699(A277807(n))).

A023758 Numbers of the form 2^i - 2^j with i >= j.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 24, 28, 30, 31, 32, 48, 56, 60, 62, 63, 64, 96, 112, 120, 124, 126, 127, 128, 192, 224, 240, 248, 252, 254, 255, 256, 384, 448, 480, 496, 504, 508, 510, 511, 512, 768, 896, 960, 992, 1008, 1016, 1020, 1022, 1023
Offset: 1

Views

Author

Keywords

Comments

Numbers whose digits in base 2 are in nonincreasing order.
Might be called "nialpdromes".
Subset of A077436. Proof: Since a(n) is of the form (2^i-1)*2^j, i,j >= 0, a(n)^2 = (2^(2i) - 2^(i+1))*2^(2j) + 2^(2j) where the first sum term has i-1 one bits and its 2j-th bit is zero, while the second sum term switches the 2j-th bit to one, giving i one bits, as in a(n). - Ralf Stephan, Mar 08 2004
Numbers whose binary representation contains no "01". - Benoit Cloitre, May 23 2004
Every polynomial with coefficients equal to 1 for the leading terms and 0 after that, evaluated at 2. For instance a(13) = x^4 + x^3 + x^2 at 2, a(14) = x^4 + x^3 + x^2 + x at 2. - Ben Paul Thurston, Jan 11 2008
From Gary W. Adamson, Jul 18 2008: (Start)
As a triangle by rows starting:
1;
2, 3;
4, 6, 7;
8, 12, 14, 15;
16, 24, 28, 30, 31;
...,
equals A000012 * A130123 * A000012, where A130123 = (1, 0,2; 0,0,4; 0,0,0,8; ...). Row sums of this triangle = A000337 starting (1, 5, 17, 49, 129, ...). (End)
First differences are A057728 = 1; 1; 1; 1; 2,1; 1; 4,2,1; 1; 8,4,2,1; 1; ... i.e., decreasing powers of 2, separated by another "1". - M. F. Hasler, May 06 2009
Apart from first term, numbers that are powers of 2 or the sum of some consecutive powers of 2. - Omar E. Pol, Feb 14 2013
From Andres Cicuttin, Apr 29 2016: (Start)
Numbers that can be digitally generated with twisted ring (Johnson) counters. This is, the binary digits of a(n) correspond to those stored in a shift register where the input bit of the first bit storage element is the inverted output of the last storage element. After starting with all 0’s, each new state is obtained by rotating the stored bits but inverting at each state transition the last bit that goes to the first position (see link).
Examples: for a(n) represented by three bits
Binary
a(5)= 4 -> 100 last bit = 0
a(6)= 6 -> 110 first bit = 1 (inverted last bit of previous number)
a(7)= 7 -> 111
and for a(n) represented by four bits
Binary
a(8) = 8 -> 1000
a(9) = 12 -> 1100 last bit = 0
a(10)= 14 -> 1110 first bit = 1 (inverted last bit of previous number)
a(11)= 15 -> 1111
(End)
Powers of 2 represented in bases which are terms of this sequence must always contain at least one digit which is also a power of 2. This is because 2^i mod (2^i - 2^j) = 2^j, which means the last digit always cycles through powers of 2 (or if i=j+1 then the first digit is a power of 2 and the rest are trailing zeros). The only known non-member of this sequence with this property is 5. - Ely Golden, Sep 05 2017
Numbers k such that k = 2^(1 + A000523(k)) - 2^A007814(k). - Daniel Starodubtsev, Aug 05 2021
A002260(n) = v(a(n)/2^v(a(n))+1) and A002024(n) = A002260(n) + v(a(n)) where v is the dyadic valuation (i.e., A007814). - Lorenzo Sauras Altuzarra, Feb 01 2023

Examples

			a(22) = 64 = 32 + 32 = 2^5 + a(16) = 2^A003056(20) + a(22-5-1).
a(23) = 96 = 64 + 32 = 2^6 + a(16) = 2^A003056(21) + a(23-6-1).
a(24) = 112 = 64 + 48 = 2^6 + a(17) = 2^A003056(22) + a(24-6-1).
		

Crossrefs

A000337(r) = sum of row T(r, c) with 0 <= c < r. See also A002024, A003056, A140129, A140130, A221975.
Cf. A007088, A130123, A101082 (complement), A340375 (characteristic function).
This is the base-2 version of A064222. First differences are A057728.
Subsequence of A077436, of A129523, of A277704, and of A333762.
Subsequences: A043569 (nonzero even terms, or equally, nonzero terms doubled), A175332, A272615, A335431, A000396 (its even terms only), A324200.
Positions of zeros in A049502, A265397, A277899, A284264.
Positions of ones in A283983, A283989.
Positions of nonzero terms in A341509 (apart from the initial zero).
Positions of squarefree terms in A260443.
Fixed points of A264977, A277711, A283165, A334666.
Distinct terms in A340632.
Cf. also A309758, A309759, A309761 (for analogous sequences).

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a023758 n = a023758_list !! (n-1)
    a023758_list = 0 : f (singleton 1) where
    f s = x : f (if even x then insert z s' else insert z $ insert (z+1) s')
    where z = 2*x; (x, s') = deleteFindMin s
    -- Reinhard Zumkeller, Sep 24 2014, Dec 19 2012
    
  • Maple
    a:=proc(n) local n2,d: n2:=convert(n,base,2): d:={seq(n2[j]-n2[j-1],j=2..nops(n2))}: if n=0 then 0 elif n=1 then 1 elif d={0,1} or d={0} or d={1} then n else fi end: seq(a(n),n=0..2100); # Emeric Deutsch, Apr 22 2006
  • Mathematica
    Union[Flatten[Table[2^i - 2^j, {i, 0, 100}, {j, 0, i}]]] (* T. D. Noe, Mar 15 2011 *)
    Select[Range[0, 2^10], NoneTrue[Differences@ IntegerDigits[#, 2], # > 0 &] &] (* Michael De Vlieger, Sep 05 2017 *)
  • PARI
    for(n=0,2500,if(prod(k=1,length(binary(n))-1,component(binary(n),k)+1-component(binary(n),k+1))>0,print1(n,",")))
    
  • PARI
    A023758(n)= my(r=round(sqrt(2*n--))); (1<<(n-r*(r-1)/2)-1)<<(r*(r+1)/2-n)
    /* or, to illustrate the "decreasing digit" property and analogy to A064222: */
    A023758(n,show=0)={ my(a=0); while(n--, show & print1(a","); a=vecsort(binary(a+1)); a*=vector(#a,j,2^(j-1))~); a} \\ M. F. Hasler, May 06 2009
    
  • PARI
    is(n)=if(n<5,1,n>>=valuation(n,2);n++;n>>valuation(n,2)==1) \\ Charles R Greathouse IV, Jan 04 2016
    
  • PARI
    list(lim)=my(v=List([0]),t); for(i=1,logint(lim\1+1,2), t=2^i-1; while(t<=lim, listput(v,t); t*=2)); Set(v) \\ Charles R Greathouse IV, May 03 2016
    
  • Python
    def a_next(a_n): return (a_n | (a_n >> 1)) + (a_n & 1)
    a_n = 1; a = [0]
    for i in range(55): a.append(a_n); a_n = a_next(a_n) # Falk Hüffner, Feb 19 2022
    
  • Python
    from math import isqrt
    def A023758(n): return (1<<(m:=isqrt(n-1<<3)+1>>1))-(1<<(m*(m+1)-(n-1<<1)>>1)) # Chai Wah Wu, Feb 23 2025

Formula

a(n) = 2^s(n) - 2^((s(n)^2 + s(n) - 2n)/2) where s(n) = ceiling((-1 + sqrt(1+8n))/2). - Sam Alexander, Jan 08 2005
a(n) = 2^k + a(n-k-1) for 1 < n and k = A003056(n-2). The rows of T(r, c) = 2^r-2^c for 0 <= c < r read from right to left produce this sequence: 1; 2, 3; 4, 6, 7; 8, 12, 14, 15; ... - Frank Ellermann, Dec 06 2001
For n > 0, a(n) mod 2 = A010054(n). - Benoit Cloitre, May 23 2004
A140130(a(n)) = 1 and for n > 1: A140129(a(n)) = A002262(n-2). - Reinhard Zumkeller, May 14 2008
a(n+1) = (2^(n - r(r-1)/2) - 1) 2^(r(r+1)/2 - n), where r=round(sqrt(2n)). - M. F. Hasler, May 06 2009
Start with A000225. If k is in the sequence, then so is 2k. - Ralf Stephan, Aug 16 2013
G.f.: (x^2/((2-x)*(1-x)))*(1 + Sum_{k>=0} x^((k^2+k)/2)*(1 + x*(2^k-1))). The sum is related to Jacobi theta functions. - Robert Israel, Feb 24 2015
A049502(a(n)) = 0. - Reinhard Zumkeller, Jun 17 2015
a(n) = a(n-1) + a(n-d)/a(d*(d+1)/2 + 2) if n > 1, d > 0, where d = A002262(n-2). - Yuchun Ji, May 11 2020
A277699(a(n)) = a(n)^2, A306441(a(n)) = a(n+1). - Antti Karttunen, Feb 15 2021 (the latter identity from A306441)
Sum_{n>=2} 1/a(n) = A211705. - Amiram Eldar, Feb 20 2022

Extensions

Definition changed by N. J. A. Sloane, Jan 05 2008

A278233 Filter-sequence for GF(2)[X]-factorization: sequence that gives the least natural number with the same prime signature that (0, 1)-polynomial encoded in the binary expansion of n has when it is factored over GF(2).

Original entry on oeis.org

1, 2, 2, 4, 4, 6, 2, 8, 6, 12, 2, 12, 2, 6, 8, 16, 16, 30, 2, 36, 4, 6, 6, 24, 2, 6, 12, 12, 6, 24, 2, 32, 6, 48, 6, 60, 2, 6, 12, 72, 2, 12, 6, 12, 24, 30, 2, 48, 6, 6, 32, 12, 6, 60, 2, 24, 12, 30, 2, 72, 2, 6, 12, 64, 36, 30, 2, 144, 4, 30, 6, 120, 2, 6, 24, 12, 6, 60, 6, 144, 4, 6, 30, 36, 64, 30, 2, 24, 6, 120, 2, 60, 6, 6, 12, 96, 2, 30, 12, 12, 30, 96, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 16 2016

Keywords

Comments

a(n) = the least number with the same prime signature as A091203(n).
This sequence works as an A046523-analog in the polynomial ring GF(2)[X] and can be used as a filter which matches with (and thus detects) any sequence in the database where a(n) depends only on the exponents of irreducible factors when the polynomial corresponding to n (via base-2 encoding) is factored over GF(2). These sequences are listed in the Crossrefs section, "Sequences that partition N into ...".
Matching in this context means that the sequence a matches with the sequence b iff for all i, j: a(i) = a(j) => b(i) = b(j). In other words, iff the sequence b partitions the natural numbers to the same or coarser equivalence classes (as/than the sequence a) by the distinct values it obtains.

Examples

			3 is "11" in binary, encodes polynomial x + 1, and 7 is "111" in binary, encodes polynomial x^2 + x + 1, both which are irreducible over GF(2). We can multiply their codes with carryless multiplication A048720 as A048720(3,7) = 9, A048720(9,3) = 27, A048720(9,7) = 63. Now a(27) = a(63) because the exponents occurring in both codes 27 and 63 are one 1 and two 2's, and their order is not significant when computing prime signature. Moreover a(27) = a(63) = 12 because that is the least number with a prime signature (1,2) in the more familiar domain of natural numbers.
a(25) = 2, because 25 is "11001" in binary, encoding polynomial x^4 + x^3 + 1, which is irreducible in the ring GF(2)[X], i.e., 25 is in A014580, whose initial term is 2.
		

Crossrefs

Cf. A014580 (gives the positions of 2's), A048720, A057889, A091203, A091205, A193231, A235042, A278231, A278238, A278239.
Similar filtering sequences: A046523, A278222, A278226, A278236, A278243.
Sequences that partition N into same or coarser equivalence classes: A091220, A091221, A091222, A106493, A106494.
Cf. also A304529, A304751, A305788 (rgs-transform), A305789.

Programs

Formula

a(n) = A046523(A091203(n)) = A046523(A091205(n)) = A046523(A235042(n)). [Because of the "sorting" essentially performed by A046523, any map from GF(2)[X] to Z can be used, as long as it is fully (cross-)multiplicative and preserves also the exponents intact.]
Other identities. For all n >= 1:
a(A014580(n)) = 2.
a(n) = a(A057889(n)) = a(A193231(n)).
a(A000695(n)) = A278238(n).
a(A277699(n)) = A278239(n).

A277320 Square array A(r,c) = A048720(A065621(r), c), read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

1, 2, 2, 3, 4, 7, 4, 6, 14, 4, 5, 8, 9, 8, 13, 6, 10, 28, 12, 26, 14, 7, 12, 27, 16, 23, 28, 11, 8, 14, 18, 20, 52, 18, 22, 8, 9, 16, 21, 24, 57, 56, 29, 16, 25, 10, 18, 56, 28, 46, 54, 44, 24, 50, 26, 11, 20, 63, 32, 35, 36, 39, 32, 43, 52, 31, 12, 22, 54, 36, 104, 42, 58, 40, 100, 46, 62, 28, 13, 24, 49, 40, 101, 112, 49, 48, 125, 104, 33, 56, 21
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Examples

			The top left corner of the array:
   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12
   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,  24
   7,  14,   9,  28,  27,  18,  21,  56,  63,  54,  49,  36
   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  44,  48
  13,  26,  23,  52,  57,  46,  35, 104, 101, 114, 127,  92
  14,  28,  18,  56,  54,  36,  42, 112, 126, 108,  98,  72
  11,  22,  29,  44,  39,  58,  49,  88,  83,  78,  69, 116
   8,  16,  24,  32,  40,  48,  56,  64,  72,  80,  88,  96
  25,  50,  43, 100, 125,  86,  79, 200, 209, 250, 227, 172
  26,  52,  46, 104, 114,  92,  70, 208, 202, 228, 254, 184
  31,  62,  33, 124,  99,  66,  93, 248, 231, 198, 217, 132
  28,  56,  36, 112, 108,  72,  84, 224, 252, 216, 196, 144
  21,  42,  63,  84,  65, 126, 107, 168, 189, 130, 151, 252
  22,  44,  58,  88,  78, 116,  98, 176, 166, 156, 138, 232
  19,  38,  53,  76,  95, 106, 121, 152, 139, 190, 173, 212
  16,  32,  48,  64,  80,  96, 112, 128, 144, 160, 176, 192
  49,  98,  83, 196, 245, 166, 151, 392, 441, 490, 475, 332
  50, 100,  86, 200, 250, 172, 158, 400, 418, 500, 454, 344
  55, 110,  89, 220, 235, 178, 133, 440, 399, 470, 481, 356
		

Crossrefs

Transpose: A277199.
Main diagonal: A277699.
Row 1: A000027, Row 3: A048727.
Column 1: A065621, Column 3: A277823, Column 5: A277825.
Cf. A277820 (array obtained by selecting only the columns with an index A001317(k), k=0..).

Programs

Formula

A(r,c) = A048720(A065621(r), c).

A277807 Numbers n such that A048720(n, A065621(n)) is a perfect square, but n is not in A023758.

Original entry on oeis.org

83, 166, 332, 365, 664, 730, 1328, 1460, 2656, 2920, 5312, 5840, 10624, 11680, 21248, 23360, 33051, 42496, 46720, 66102, 84992, 93440, 115785, 132204, 169984, 186880, 231570, 264408, 279099, 339968, 373760, 388731, 463140, 528816, 558198, 679936, 747520, 777462, 926280, 1057632, 1116396, 1359872, 1495040, 1554924, 1677591
Offset: 1

Views

Author

Antti Karttunen, Nov 01 2016

Keywords

Comments

Not yet proved: Equally, numbers n such that A048720(n, A065621(n)) = k^2 for some k different from n.
If n is included in this sequence, then also 2n is included (and vice versa), thus the sequence is infinite and wholly determined by its odd terms.

Crossrefs

Setwise difference of A277704 \ A023758.
Cf. A277806 (the square roots of the solutions).
Showing 1-10 of 13 results. Next