mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > MattcAnderson

Reply
 
Thread Tools
Old 2017-04-26, 16:43   #1
MattcAnderson
 
MattcAnderson's Avatar
 
"Matthew Anderson"
Dec 2010
Oregon, USA

22×149 Posts
Default OEIS sequence A027750

Here is my mathematical doodle for today.
I noticed that OEIS.org/A027750/
has no Maple code in it.
I know that there are not many Maple people who frequent mersenneforum.org, but maybe
someone else will follow through with this, if I don't.
The Maple code goes like this -
for a from 1 to 20 do
if isprime(a) = false then print(ifactor(a)); else print(a); end if;
end do;
This code functions, but it does not produce the same sequence as A27750.
For what its worth,
Matt
Attached Files
File Type: pdf A027750.pdf (79.0 KB, 52 views)
MattcAnderson is offline   Reply With Quote
Old 2017-04-26, 17:18   #2
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

5×11×157 Posts
Default

you forgot to print the 1's (every number is divisible by 1) and all the composite divisors. In Pari that would be "n=100; for(i=1,n,print(divisors(i)))" or so, with a trick to avoid printing all the brackets (like adding them to a list, or so, instead of printing).
LaurV is offline   Reply With Quote
Old 2017-04-26, 22:19   #3
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

Quote:
Originally Posted by LaurV View Post
you forgot to print the 1's (every number is divisible by 1) and all the composite divisors. In Pari that would be "n=100; for(i=1,n,print(divisors(i)))" or so, with a trick to avoid printing all the brackets (like adding them to a list, or so, instead of printing).
Code:
v=List(); for(n=1, 20, fordiv(n, d, listput(v, d))); Vec(v)
is already listed in the sequence
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Primes in A048788 OEIS Sequence carpetpool Miscellaneous Math 9 2017-03-17 22:57
OEIS - A057732 : 2^n + 3 T.Rex Miscellaneous Math 40 2015-09-15 14:01
OEIS - 2·A261539: (2^n+5)/3 , n even T.Rex Miscellaneous Math 38 2015-09-05 16:14
OEIS - A059242 : 2^n+5 , n odd T.Rex Miscellaneous Math 7 2015-08-28 18:04
my misunderstanding of the OEIS science_man_88 Miscellaneous Math 11 2011-05-18 15:04

All times are UTC. The time now is 20:40.

Fri Aug 7 20:40:10 UTC 2020 up 21 days, 16:26, 1 user, load averages: 1.61, 1.80, 1.78

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.