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-2 of 2 results.

A175825 Maximum signed integer that can be stored in n bytes.

Original entry on oeis.org

127, 32767, 8388607, 2147483647, 549755813887, 140737488355327, 36028797018963967, 9223372036854775807, 2361183241434822606847, 604462909807314587353087, 154742504910672534362390527, 39614081257132168796771975167, 10141204801825835211973625643007
Offset: 1

Views

Author

Grant Garcia, Sep 14 2010

Keywords

Examples

			a(1) = 2^7 - 1 = 128 - 1 = 127.
a(2) = 2^15 - 1 = 32768 - 1 = 32767.
a(3) = 2^23 - 1 = 8388608 - 1 = 8388607.
		

Crossrefs

Programs

  • Mathematica
    Table[2^(8n - 1) - 1, {n, 1, 11}]
  • PARI
    Vec(x*(127+128*x)/((1-x)*(1-256*x)) + O(x^50)) \\ Colin Barker, May 12 2016
  • Python
    print([2**(8 * i - 1) - 1 for i in range(1, 12)])
    

Formula

a(n) = 2^(8*n - 1) - 1.
From Colin Barker, May 12 2016: (Start)
a(n) = 257*a(n-1)-256*a(n-2) for n>2.
G.f.: x*(127+128*x) / ((1-x)*(1-256*x)).
(End)

A295838 Largest value corresponding to a string of n printable ASCII characters.

Original entry on oeis.org

0, 126, 32382, 8289918, 2122219134, 543288098430, 139081753198206, 35604928818740862, 9114861777597660798, 2333404615065001164414, 597351581456640298090110
Offset: 0

Views

Author

Abilene Sukin, Nov 28 2017

Keywords

Comments

The n-th term of this sequence is the result of forming an ASCII (American Standard Code for Information Exchange) text string of n characters using the (printable) character with the largest binary value and then converting the binary value of the string to base 10. a(n) is therefore a measure of the largest possible size of an ASCII string with n printable characters. This sequence uses standard 7-bit ASCII; A175824 is the same sequence using 8-bit Extended ASCII.
Conjecture: For every a(n) there exists a sequence of primes (p(1), p(2), p(3), ...) such that for each term a(n) there exists a set of primes that when added to the term result in another prime. For example, a(2)=126 and 126 + {5,11,13,23,37,41,47,...} all are primes.
Corollary 1: If it is the case that the size of the set of prime numbers is countably infinite, then the cardinality of the sequence that contains the sequence of primes p(1), p(2), ... that produce a new prime for every a(n) is uncountably infinite ... [ (a(1)+p(1), a(1)+p(2), a(1)+p(3), ...), (a(2)+p(1)', a(2)+p(2)', a(2)+p(3)'), ...)

Examples

			The lexicographically last 2-character printable ASCII string is "~~", which is 7E7E in hexadecimal or 32382 in decimal, thus a(2) = 32382.
		

Crossrefs

Cf. A175824.

Programs

  • Magma
    [(42/85)*(256^n - 1) : n in [0..20]]; // Wesley Ivan Hurt, Nov 29 2017
  • Maple
    A295838:=n->(42/85)*(256^n - 1): seq(A295838(n), n=0..20); # Wesley Ivan Hurt, Nov 29 2017
  • Mathematica
    Array[(42/85) (256^# - 1) &, 11, 0] (* Michael De Vlieger, Dec 11 2017 *)
    CoefficientList[Series[126 x/((1 - 256 x) (1 - x)), {x, 0, 10}], x] (* Michael De Vlieger, Dec 11 2017 *)
  • PARI
    a(n) = 42/85*(256^n-1) \\ Iain Fox, Nov 28 2017
    
  • PARI
    first(n) = Vec(126*x/((1-256*x)*(1-x)) + O(x^n), -n) \\ Iain Fox, Nov 28 2017
    

Formula

a(n) = (42/85)*(256^n - 1).
From Iain Fox, Nov 28 2017: (Start)
G.f.: 126*x/((1-256*x)*(1-x)).
E.g.f.: 42/85*(e^(256*x)-e^x).
a(n) = 42/85 * A175824(n).
(End)
For n > 0, a(n) = 256*a(n-1) + 126. - Jon E. Schoenfield, Nov 29 2017
For n > 1, a(n) = 257*a(n-1) - 256*a(n-2). - Iain Fox, Jan 02 2018
Showing 1-2 of 2 results.